Skip to content

Commit 668fc43

Browse files
authored
Prepare release for v0.2.0 (#6)
Updates gemspecs for `v0.2.0`, and also fixes up the gemspec update script and release instructions as we iron out this whole process.
1 parent 963e9bd commit 668fc43

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
riverqueue (0.1.0)
4+
riverqueue (0.2.0)
55

66
GEM
77
remote: https://rubygems.org/

docs/development.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,24 @@ $ open coverage/index.html
4444

4545
## Publish gems
4646

47-
Update `CHANGELOG.md` to include the new version and open a pull request with the changes.
48-
4947
```shell
5048
git checkout master && git pull --rebase
5149
export VERSION=v0.0.x
5250

53-
ruby scripts/update_gemspec_version.rb riverqueue.gemspec > riverqueue.gemspec
51+
ruby scripts/update_gemspec_version.rb riverqueue.gemspec
52+
ruby scripts/update_gemspec_version.rb drivers/riverqueue-activerecord/riverqueue-activerecord.gemspec
53+
ruby scripts/update_gemspec_version.rb drivers/riverqueue-sequel/riverqueue-sequel.gemspec
54+
```
55+
56+
Update `CHANGELOG.md` to include the new version and open a pull request with those changes and the ones to the gemspecs above.
57+
58+
```shell
5459
gem build riverqueue.gemspec
5560
gem push riverqueue-${"${VERSION}"/v/}.gem
5661

57-
ruby scripts/update_gemspec_version.rb drivers/riverqueue-activerecord.gemspec > drivers/riverqueue-activerecord.gemspec
5862
pushd drivers/riverqueue-activerecord && gem build riverqueue-activerecord.gemspec && popd
5963
pushd drivers/riverqueue-activerecord && gem push riverqueue-activerecord-${"${VERSION}"/v/}.gem && popd
6064

61-
ruby scripts/update_gemspec_version.rb drivers/riverqueue-sequel.gemspec > drivers/riverqueue-sequel.gemspec
6265
pushd drivers/riverqueue-sequel && gem build riverqueue-sequel.gemspec && popd
6366
pushd drivers/riverqueue-sequel && gem push riverqueue-sequel-${"${VERSION}"/v/}.gem && popd
6467

drivers/riverqueue-activerecord/riverqueue-activerecord.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = "riverqueue-activerecord"
3-
s.version = "0.1.0"
3+
s.version = "0.2.0"
44
s.summary = "ActiveRecord driver for the River Ruby gem."
55
s.description = "ActiveRecord driver for the River Ruby gem. Use in conjunction with the riverqueue gem to insert jobs that are worked in Go."
66
s.authors = ["Blake Gentry", "Brandur Leach"]

drivers/riverqueue-sequel/riverqueue-sequel.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = "riverqueue-sequel"
3-
s.version = "0.1.0"
3+
s.version = "0.2.0"
44
s.summary = "Sequel driver for the River Ruby gem."
55
s.description = "Sequel driver for the River Ruby gem. Use in conjunction with the riverqueue gem to insert jobs that are worked in Go."
66
s.authors = ["Blake Gentry", "Brandur Leach"]

riverqueue.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = "riverqueue"
3-
s.version = "0.1.0"
3+
s.version = "0.2.0"
44
s.summary = "River is a fast job queue for Go."
55
s.description = "River is a fast job queue for Go. Use this gem in conjunction with gems riverqueue-activerecord or riverqueue-sequel to insert jobs in Ruby which will be worked from Go."
66
s.authors = ["Blake Gentry", "Brandur Leach"]

scripts/update_gemspec_version.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88

99
file_data = File.read(file)
1010

11-
updated_file_data = file_data.gsub(%r{^(\W+)s\.version = "0.2.0"$}, %(\\1s.version = "#{version}"))
11+
version = version[1..] # strip `v` from the beginning of the string
12+
13+
updated_file_data = file_data.gsub(%r{^(\W+)s\.version = "[\d\.]+"$}, %(\\1s.version = "#{version}"))
1214

1315
abort("failure: nothing changed in file") if file_data == updated_file_data
1416

15-
puts updated_file_data
17+
File.write(file, updated_file_data)

0 commit comments

Comments
 (0)