2014-08-26 01:05:02 +00:00
# Releasing Hashie
There're no particular rules about when to release Hashie. Release bug fixes frequenty, features not so frequently and breaking API changes rarely.
2015-12-05 15:37:45 +00:00
## Release
2014-08-26 01:05:02 +00:00
Run tests, check that all tests succeed locally.
```sh
bundle install
bundle exec rake
```
2019-11-17 17:35:30 +00:00
Check that the last build succeeded in [Travis CI ](https://travis-ci.org/hashie/hashie ) for all supported platforms.
2014-08-26 01:05:02 +00:00
2015-12-05 15:37:45 +00:00
### Check Next Version
2014-08-26 01:05:02 +00:00
2015-12-05 15:37:45 +00:00
Increment the version, modify [lib/hashie/version.rb ](lib/hashie/version.rb ). [Changelog ](CHANGELOG.md ) entries should be helpfully categorized to assist in picking the next version number.
* Increment the third number (minor version) if the release has bug fixes and/or very minor features, only (eg. change `0.5.1` to `0.5.2` ). These should be in the "Fixed", "Security", or "Miscellaneous" categories in the change log.
* Increment the second number (patch version) if the release contains major features or breaking API changes (eg. change `0.5.1` to `0.6.0` ). These should be in the "Added" or "Deprecated" categories in the change log.
* Increment the first number (major version) if the release has any changed or removed behavior on public APIs (eg. change `0.5.1` to `1.0.0` ). These should be in the "Changed" or "Removed" categories in the change log.
### Modify the Readme
2014-08-26 01:05:02 +00:00
Modify the "Stable Release" section in [README.md ](README.md ). Change the text to reflect that this is going to be the documentation for a stable release. Remove references to the previous release of Hashie. Keep the file open, you'll have to undo this change after the release.
```markdown
## Stable Release
You're reading the documentation for the stable release of Hashie, 3.3.0.
```
2015-12-05 15:37:45 +00:00
### Modify the Changelog
Change "Unreleased" in [CHANGELOG.md ](CHANGELOG.md ) to the new version.
2014-08-26 01:05:02 +00:00
```markdown
2015-12-05 15:37:45 +00:00
## [3.3.0] - 2014-08-25
2019-11-17 17:35:30 +00:00
[3.3.0]: https://github.com/hashie/hashie/compare/v< LAST_VERSION > ..v< THIS_VERSION >
2014-08-26 01:05:02 +00:00
```
2015-12-05 15:37:45 +00:00
Replace `<LAST_VERSION>` and `<THIS_VERSION>` with the last and new-to-be-released versions to set up the compare view on Github.
2016-09-16 13:39:08 +00:00
Remove any sections that only have "Your contribution here." underneath them.
2014-08-26 01:05:02 +00:00
Commit your changes.
```sh
git add README.md CHANGELOG.md lib/hashie/version.rb
git commit -m "Preparing for release, 3.3.0."
git push origin master
```
2015-12-05 15:37:45 +00:00
### Push to RubyGems.org
2014-08-26 01:05:02 +00:00
Release.
```sh
$ rake release
hashie 3.3.0 built to pkg/hashie-3.3.0.gem.
Tagged v3.3.0.
Pushed git commits and tags.
Pushed hashie 3.3.0 to rubygems.org.
```
2015-12-05 15:37:45 +00:00
## Prepare for the Next Version
2014-08-26 01:05:02 +00:00
Modify the "Stable Release" section in [README.md ](README.md ). Change the text to reflect that this is going to be the next release.
```markdown
## Stable Release
You're reading the documentation for the next release of Hashie, which should be 3.3.1.
2019-11-17 17:35:30 +00:00
The current stable release is [3.3.0 ](https://github.com/hashie/hashie/blob/v3.3.0/README.md ).
2014-08-26 01:05:02 +00:00
```
2015-12-05 15:37:45 +00:00
Add new "Unreleased" section to [CHANGELOG.md ](CHANGELOG.md ) using this template:
2014-08-26 01:05:02 +00:00
```markdown
2015-12-05 15:37:45 +00:00
## [Unreleased][unreleased]
2019-11-17 17:35:30 +00:00
[unreleased]: https://github.com/hashie/hashie/compare/v< THIS_VERSION > ...master
2015-12-05 15:37:45 +00:00
### Added
2016-09-16 13:39:08 +00:00
* Your contribution here.
2015-12-05 15:37:45 +00:00
### Changed
2016-09-16 13:39:08 +00:00
* Your contribution here.
2014-08-26 01:05:02 +00:00
2015-12-05 15:37:45 +00:00
### Deprecated
2016-09-16 13:39:08 +00:00
* Your contribution here.
2015-12-05 15:37:45 +00:00
### Removed
2016-09-16 13:39:08 +00:00
* Your contribution here.
2015-12-05 15:37:45 +00:00
### Fixed
2016-09-16 13:39:08 +00:00
* Your contribution here.
2015-12-05 15:37:45 +00:00
### Security
2016-09-16 13:39:08 +00:00
* Your contribution here.
2015-12-05 15:37:45 +00:00
2017-02-22 12:49:01 +00:00
### Miscellaneous
2015-12-05 15:37:45 +00:00
2016-09-16 13:39:08 +00:00
* Your contribution here.
2014-08-26 01:05:02 +00:00
```
2015-12-05 15:37:45 +00:00
Replace `<THIS_VERSION>` with the newly released versions to set up the compare view on Github.
2016-04-29 16:35:13 +00:00
Increment the minor version, modify [lib/hashie/version.rb ](lib/hashie/version.rb ).
2014-08-26 01:05:02 +00:00
Commit your changes.
```sh
2017-02-22 12:49:01 +00:00
git add CHANGELOG.md README.md lib/hashie/version.rb
2016-04-29 16:35:13 +00:00
git commit -m "Preparing for next development iteration, 3.3.1."
2014-08-26 01:05:02 +00:00
git push origin master
```