From 660333f5b2bb8e01ba1ef9312f5d17d8895c9e58 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 20:02:19 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Normalize=20instructions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8480f93..a986338 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,17 +24,18 @@ See: [RubyGems Security Guide][🔒️rubygems-security-guide] 4. Run `git commit -am "🔖 Prepare release v"` to commit the changes 5. Run `git push` to trigger the final CI pipeline before release, & merge PRs - NOTE: Remember to [check the build][🧪build]! -6. Run `git checkout main` -7. Run `git pull origin main` to ensure you will release the latest trunk code. -8. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums +6. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME` +7. Run `git checkout $GIT_TRUNK_BRANCH_NAME` +8. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure you will release the latest trunk code +9. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums - Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH` - If the echo above has no output, then it didn't work. - Note that you'll need the `zsh/datetime` module, if running `zsh`. - In `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH` -9. Run `bundle exec rake build` -10. Run [`bin/checksums`][🔒️rubygems-checksums-pr] to create SHA-256 and SHA-512 checksums +10. Run `bundle exec rake build` +11. Run [`bin/checksums`][🔒️rubygems-checksums-pr] to create SHA-256 and SHA-512 checksums - Checksums will be committed automatically by the script, but not pushed -11. Run `bundle exec rake release` which will create a git tag for the version, +12. Run `bundle exec rake release` which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems] ## Contributors