Skip to content

Commit

Permalink
Add script to automate bumping patch versions [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
Envek committed Aug 2, 2024
1 parent 4e44ec5 commit 9b3736f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: bump guard-%

bump: guard-VERSION
$(eval escaped_minor := $(shell echo ${VERSION} | sed -n 's/\([0-9]\+\.[0-9]\+\).*/\1/p' | sed -e 's/[]\/$*.^[]/\\&/g'))
sed -i "s/${escaped_minor}\.[0-9]\+/${VERSION}/g" README.md .github/workflows/build-push.yml

guard-%:
@ if [ "${${*}}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ For Ruby 3.0, short aliases for latest patch versions are made against Debian 10

Ruby is installed from official APT package repository. Rbenv isn't used.

## Bumping versions

After a new version of Ruby was released:

1. Check pull requests at the https://github.com/fullstaq-ruby/server-edition/ repository and ensure that packages for the target version has been build and published (pull request adding this has been merged).

2. Execute `make bump VERSION=X.Y.Z` (specify full version in `X.Y.Z`), it will replace previous patch version in both Github Action and README files.

3. Commit and push changed `README.md` and `.github/workflows/build-push.yml`. Once they will reach main branch, new images will be pushed to the registry automatically.

[Fullstaq Ruby]: https://fullstaqruby.org/ "Ruby, optimized for production"
[Hongli Lai]: https://www.joyfulbikeshedding.com/
Expand Down

0 comments on commit 9b3736f

Please sign in to comment.