Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gem-release #3060

Merged
merged 2 commits into from
Jan 31, 2019
Merged

Conversation

kennyadsl
Copy link
Member

@kennyadsl kennyadsl commented Jan 28, 2019

Description

We have currently no process/convention around releasing a new gem version and I'd like this operation to be easy for everyone in the core team.

For this reason, I'd like to add gem-release gem to our dependencies.

Once we merge this PR we'll be able to release new versions with ease, and consistently between versions.

Some examples of the command to run are:

$ gem bump -v 2.8.0 --tag --push --remote upstream

Checking out branch v2.8.0
$ git checkout -b v2.8.0

Bumping solidus from version 2.8.0.alpha to 2.8.0
Staging core/lib/spree/core/version.rb
$ git add core/lib/spree/core/version.rb

Creating commit
$ git commit -m "Bump solidus Solidus to 2.8.0"

Pushing to the upstream git repository
$ git push upstream

Tagging solidus as version 2.8.0
Creating git tag v2.8.0
$ git tag -am "tag v2.8.0" v2.8.0

Pushing tags to the upstream git repository
$ git push --tags upstream

All is good, thanks my friend.

and release with just:

$ gem release

Releasing solidus_api with version 2.8.0
Building solidus_api.gemspec
$ gem build solidus_api.gemspec

Pushing solidus_api-2.8.0.gem
$ gem push solidus_api-2.8.0.gem

Deleting left over gem file solidus_api-2.8.0.gem
$ rm -f solidus_api-2.8.0.gem

Releasing solidus_backend with version 2.8.0
Building solidus_backend.gemspec
$ gem build solidus_backend.gemspec

Pushing solidus_backend-2.8.0.gem
$ gem push solidus_backend-2.8.0.gem

Deleting left over gem file solidus_backend-2.8.0.gem
$ rm -f solidus_backend-2.8.0.gem

Releasing solidus_core with version 2.8.0
Building solidus_core.gemspec
$ gem build solidus_core.gemspec

Pushing solidus_core-2.8.0.gem
$ gem push solidus_core-2.8.0.gem

Deleting left over gem file solidus_core-2.8.0.gem
$ rm -f solidus_core-2.8.0.gem

Releasing solidus_frontend with version 2.8.0
Building solidus_frontend.gemspec
$ gem build solidus_frontend.gemspec

Pushing solidus_frontend-2.8.0.gem
$ gem push solidus_frontend-2.8.0.gem

Deleting left over gem file solidus_frontend-2.8.0.gem
$ rm -f solidus_frontend-2.8.0.gem

Releasing solidus_sample with version 2.8.0
Building solidus_sample.gemspec
$ gem build solidus_sample.gemspec

Pushing solidus_sample-2.8.0.gem
$ gem push solidus_sample-2.8.0.gem

Deleting left over gem file solidus_sample-2.8.0.gem
$ rm -f solidus_sample-2.8.0.gem

Releasing solidus with version 2.8.0
Building solidus.gemspec
$ gem build solidus.gemspec

Pushing solidus-2.8.0.gem
$ gem push solidus-2.8.0.gem

Deleting left over gem file solidus-2.8.0.gem
$ rm -f solidus-2.8.0.gem

All is good, thanks my friend.

So we could just run:

gem bump -v 2.8.0 --tag --push --remote upstream && gem release

I'm also trying to test this branch svenfuchs/gem-release#73 so, if/when it will be merged, we could also have the creation of GitHub Release in the same command with something like:

gem bump -v 2.8.0 --tag --push --remote upstream && gem release --github --token GITHUB_TOKEN

Which is much better than the current manual procedure.

Checklist:

  • Pull Request guidelines are respected
  • Documentation/Readme have been updated accordingly
  • Changes are covered by tests (if possible)
  • Each commit has a meaningful message attached that described WHAT changed, and WHY

@kennyadsl kennyadsl self-assigned this Jan 28, 2019
This gem will allow to have a shared config file into the repository
so we can easily define a procedure on releasing new gem versions.
gem-release is looking for that constant to understand current version
and allow bump to the new one with a command.
@kennyadsl kennyadsl force-pushed the kennyadsl/add-gem-release branch from 1abe159 to 7128a5c Compare January 30, 2019 15:51
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition, thank you! 👏

@kennyadsl kennyadsl merged commit 4a1e245 into solidusio:master Jan 31, 2019
@kennyadsl kennyadsl deleted the kennyadsl/add-gem-release branch January 31, 2019 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants