|
| 1 | +# Release Process |
| 2 | + |
| 3 | + This document describes the process for releasing a new version of couchbase-orm. |
| 4 | + |
| 5 | + ## Prerequisites |
| 6 | + |
| 7 | + - Write access to the repository |
| 8 | + - RubyGems account with push permissions for the gem |
| 9 | + - Clean local master branch |
| 10 | + |
| 11 | + ## Release Steps |
| 12 | + |
| 13 | + ### 1. Update Version |
| 14 | + |
| 15 | + Edit `lib/couchbase-orm/version.rb` with the new version number: |
| 16 | + |
| 17 | + ```ruby |
| 18 | + # frozen_string_literal: true, encoding: ASCII-8BIT |
| 19 | + |
| 20 | + module CouchbaseOrm |
| 21 | + VERSION = 'X.Y.Z' |
| 22 | + end |
| 23 | + |
| 24 | + Commit the change: |
| 25 | + |
| 26 | + git add lib/couchbase-orm/version.rb |
| 27 | + git commit -m "Bump version to X.Y.Z" |
| 28 | + git push origin master |
| 29 | + |
| 30 | + 2. Create Git Tag |
| 31 | + |
| 32 | + Tag the release on master: |
| 33 | + |
| 34 | + git tag X.Y.Z |
| 35 | + git push origin X.Y.Z |
| 36 | + |
| 37 | + 3. Verify Clean State |
| 38 | + |
| 39 | + Ensure your local master branch is clean and up-to-date: |
| 40 | + |
| 41 | + git checkout master |
| 42 | + git pull |
| 43 | + git status # Should show "nothing to commit, working tree clean" |
| 44 | + |
| 45 | + 4. Build the Gem |
| 46 | + |
| 47 | + Build the gem locally: |
| 48 | + |
| 49 | + gem build couchbase-orm.gemspec |
| 50 | + |
| 51 | + This will create a file like couchbase-orm-X.Y.Z.gem. |
| 52 | + |
| 53 | + 5. Push to RubyGems |
| 54 | + |
| 55 | + Push the built gem to RubyGems (you'll need your OTP code): |
| 56 | +
|
| 57 | + gem push couchbase-orm-X.Y.Z.gem --otp YOUR_OTP_CODE |
| 58 | +
|
| 59 | + Note: Replace YOUR_OTP_CODE with your actual one-time password from your authenticator app. |
| 60 | +
|
| 61 | + 6. Verify Release |
| 62 | +
|
| 63 | + Check that the new version appears on the gem page: |
| 64 | +
|
| 65 | + https://rubygems.org/gems/couchbase-orm |
| 66 | +
|
| 67 | + Post-Release |
| 68 | +
|
| 69 | + - Announce the release if applicable (changelog, team communication, etc.) |
| 70 | + - Update any documentation that references the version number |
| 71 | +
|
| 72 | + Version Numbering |
| 73 | +
|
| 74 | + This project follows https://semver.org/: |
| 75 | +
|
| 76 | + - MAJOR version for incompatible API changes |
| 77 | + - MINOR version for backwards-compatible functionality additions |
| 78 | + - PATCH version for backwards-compatible bug fixes |
| 79 | +
|
| 80 | +
|
0 commit comments