diff --git a/Makefile b/Makefile index 277c54466..c156f215a 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,8 @@ shell-check: VERSION: tools/version.sh -bump-python-version: VERSION - tools/bump-python-version.sh - .PHONY: tarball -tarball: VERSION bump-python-version +tarball: VERSION $(MAKE) -C legacy build cd .. && tar -czf libretime-$(shell cat VERSION | tr -d [:blank:]).tar.gz \ --owner=root --group=root \ diff --git a/docs/developer-manual/development/releases.md b/docs/developer-manual/development/releases.md index d0b3998af..ce88f750c 100644 --- a/docs/developer-manual/development/releases.md +++ b/docs/developer-manual/development/releases.md @@ -58,7 +58,8 @@ Create a new `release-$VERSION` branch and release commit to prepare a release p ```bash git checkout -b "release-$VERSION" -git commit --allow-empty "chore: release $VERSION" +export COMMIT_MESSAGE="chore: release $VERSION" +git commit --allow-empty "$COMMIT_MESSAGE" ``` ### 1. Version bump @@ -66,11 +67,10 @@ git commit --allow-empty "chore: release $VERSION" Write the new `$VERSION` to the VERSION file, and bump the python packages version: ```bash -echo $VERSION > VERSION -bash tools/bump-python-version.sh +bash tools/bump-python-version.sh "$VERSION" git add . -git commit --fixup ":/chore: release $VERSION" +git commit --fixup ":/$COMMIT_MESSAGE" ``` ### 2. Release note @@ -99,7 +99,7 @@ Commit the release note changes: ```bash git add . -git commit --fixup ':/chore: release' +git commit --fixup ":/$COMMIT_MESSAGE" ``` ### 3. Website and docs @@ -122,7 +122,7 @@ Commit the website and docs changes: ```bash git add . -git commit --fixup ':/chore: release' +git commit --fixup ":/$COMMIT_MESSAGE" ``` ### 4. Create a new pull request diff --git a/tools/bump-python-version.sh b/tools/bump-python-version.sh index 763fb0423..c4fe3bed1 100755 --- a/tools/bump-python-version.sh +++ b/tools/bump-python-version.sh @@ -11,7 +11,7 @@ error() { command -v sed > /dev/null || error "sed command not found!" -version="$(cat VERSION)" +version="$1" for setup_path in */setup.py; do sed --in-place \