Skip to content

Commit

Permalink
Prepare release for v0.2.0 (#6)
Browse files Browse the repository at this point in the history
Updates gemspecs for `v0.2.0`, and also fixes up the gemspec update
script and release instructions as we iron out this whole process.
  • Loading branch information
brandur authored Apr 27, 2024
1 parent 963e9bd commit 668fc43
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
riverqueue (0.1.0)
riverqueue (0.2.0)

GEM
remote: https://rubygems.org/
Expand Down
13 changes: 8 additions & 5 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,24 @@ $ open coverage/index.html

## Publish gems

Update `CHANGELOG.md` to include the new version and open a pull request with the changes.

```shell
git checkout master && git pull --rebase
export VERSION=v0.0.x

ruby scripts/update_gemspec_version.rb riverqueue.gemspec > riverqueue.gemspec
ruby scripts/update_gemspec_version.rb riverqueue.gemspec
ruby scripts/update_gemspec_version.rb drivers/riverqueue-activerecord/riverqueue-activerecord.gemspec
ruby scripts/update_gemspec_version.rb drivers/riverqueue-sequel/riverqueue-sequel.gemspec
```

Update `CHANGELOG.md` to include the new version and open a pull request with those changes and the ones to the gemspecs above.

```shell
gem build riverqueue.gemspec
gem push riverqueue-${"${VERSION}"/v/}.gem

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "riverqueue-activerecord"
s.version = "0.1.0"
s.version = "0.2.0"
s.summary = "ActiveRecord driver for the River Ruby gem."
s.description = "ActiveRecord driver for the River Ruby gem. Use in conjunction with the riverqueue gem to insert jobs that are worked in Go."
s.authors = ["Blake Gentry", "Brandur Leach"]
Expand Down
2 changes: 1 addition & 1 deletion drivers/riverqueue-sequel/riverqueue-sequel.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "riverqueue-sequel"
s.version = "0.1.0"
s.version = "0.2.0"
s.summary = "Sequel driver for the River Ruby gem."
s.description = "Sequel driver for the River Ruby gem. Use in conjunction with the riverqueue gem to insert jobs that are worked in Go."
s.authors = ["Blake Gentry", "Brandur Leach"]
Expand Down
2 changes: 1 addition & 1 deletion riverqueue.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "riverqueue"
s.version = "0.1.0"
s.version = "0.2.0"
s.summary = "River is a fast job queue for Go."
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."
s.authors = ["Blake Gentry", "Brandur Leach"]
Expand Down
6 changes: 4 additions & 2 deletions scripts/update_gemspec_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@

file_data = File.read(file)

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

updated_file_data = file_data.gsub(%r{^(\W+)s\.version = "[\d\.]+"$}, %(\\1s.version = "#{version}"))

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

puts updated_file_data
File.write(file, updated_file_data)

0 comments on commit 668fc43

Please sign in to comment.