Skip to content

Commit 75eccb1

Browse files
Create branch for new channel based on the latest channel instead of master (#193)
1 parent 3c7cee1 commit 75eccb1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

bin/newver

+10-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@ if [ $# -eq 0 ]; then
77
fi
88
NEWVER="$1"
99

10+
previous_channel() {
11+
cat <<EOM | ruby
12+
version = "${NEWVER}".match(/(\d+).(\d+).(\d+)/)
13+
minor = version[2].to_i - 1
14+
puts "channel/rubocop-#{version[1]}-#{minor}"
15+
EOM
16+
}
17+
1018
git checkout Gemfile*
19+
git fetch origin
20+
git checkout $(previous_channel)
1121
git checkout -b "newver/${NEWVER}"
1222

1323
ed Gemfile <<-EDITS
14-
/gem "parser",/c
15-
gem "parser"
16-
.
1724
/gem "rubocop",/c
1825
gem "rubocop", "${NEWVER}", require: false
1926
.

0 commit comments

Comments
 (0)