Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ GEM
unicode-display_width (~> 1.0, >= 1.0.1)
rubocop-migrations (0.1.2)
rubocop (~> 0.41)
rubocop-rspec (1.21.0)
rubocop (>= 0.52.0)
rubocop-rspec (1.30.0)
rubocop (>= 0.58.0)
ruby-progressbar (1.10.0)
safe_yaml (1.0.4)
thread_safe (0.3.6)
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: image test docs
.PHONY: image test docs bundle

IMAGE_NAME ?= codeclimate/codeclimate-rubocop

Expand All @@ -14,3 +14,9 @@ docs: image
--workdir /usr/src/app \
--volume $(PWD):/usr/src/app \
$(IMAGE_NAME) sh -c "apk --update add git && bundle install --with=test && bundle exec rake docs:scrape"

bundle:
docker run --rm \
--entrypoint /bin/sh \
--volume $(PWD):/usr/src/app \
$(IMAGE_NAME) -c "cd /usr/src/app && bundle $(BUNDLE_ARGS)"
38 changes: 38 additions & 0 deletions bin/newver
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh
set -eu

if [ $# -eq 0 ]; then
>&2 echo "Usage: 'bin/newver X.Y.Z', where X.Y.Z is the Rubocop version to add."
exit 1
fi
NEWVER="$1"

git checkout Gemfile*
git checkout -b "newver/${NEWVER}"

ed Gemfile <<-EDITS
/gem "parser",/c
gem "parser"
.
/gem "rubocop",/c
gem "rubocop", "~> ${NEWVER}", require: false
.
wq
EDITS

make bundle -e BUNDLE_ARGS="update rubocop"
make image
make docs
sudo chown -R $(id -u):$(id -g) config

set +e
make test
retval=$?
if [ $retval -ne 0 ]; then
>&2 echo "If tests fail, you may need to modify spec/support/currently_undocumented_cops.txt"
exit $retval
fi
set -e

git add config spec Gemfile*
git commit -v -m "Updated channel and documentation to Rubocop v${NEWVER}"