From 9b3736f42bbc28a914c20848571d34d3fe9f5109 Mon Sep 17 00:00:00 2001 From: Andrey Novikov Date: Fri, 2 Aug 2024 18:53:27 +0300 Subject: [PATCH] Add script to automate bumping patch versions [ci skip] --- Makefile | 11 +++++++++++ README.md | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8cecaab --- /dev/null +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 11665a3..1d47664 100644 --- a/README.md +++ b/README.md @@ -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/