Skip to content
Fabio Pelosin edited this page May 24, 2014 · 5 revisions

The release process

Preparation

To release a gem the following actions must me performed:

  • Ensure that the local checkout of Rainforest is in a clean state
  • Bump the version of the gem (which should be in a dedicated file)
  • Update the changelog

Note: The optimistic requirement in the CocoaPods gemspec should be updated as soon as the version of any of its dependency changes. This is done to ensure that the head of the Gem can be used for the development of CocoaPods without complications.

Release

From the Rainforest dir run:

$ rake release[DIR_NAME]

This will perform the following actions:

Checks

  • Check that the local checkout is on the master branch
  • Check that a tag for the version doesn't exists
  • Ensure that only one file other than the CHANGELOG.md and the Gemfile.lock has changes
    • Note: The Gemfile.lock should be changed only to take into account the new version of the gem.
  • Check that the CHANGELOG.md file includes the version (## VERSION format)
  • Confirm with the user the release version

The checks can be skipped with the SKIP_CHECKS environment variable (don't do it!)

Actions

  • Pull the repo (to ensure that it is up to date). If the pull fails the process is aborted.
  • Execute the rake tasks
  • Invoke the pre_release rake task in the repo of the gem which is being released if present (this is used by Xcodeproj for example)
  • Invoke the rake build task in the repo of the gem (this task is one of the bundler tasks)
  • Test the installation of the built gem package using the gem install command (ensures that the dependency requirements are satisfied by the gems available on RubyGems)
  • Commit, tag and push the release
  • Push the gem
  • Invoke the post_release rake task in the repo of the gem

Conclusion

After a couple of seconds the gem should be available for installation via the gem command line tool.

Important considerations

  • Always release the gems without dependencies first and proceed in this order up to CocoaPods.
  • Always update each dependency requirement with a dedicated commit on CocoaPods.
Clone this wiki locally