Skip to content

Commit

Permalink
Fixed incorrect check for release branch in 'make release_publish'
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <[email protected]>
  • Loading branch information
andy-maier committed Oct 9, 2024
1 parent b0d5e3f commit a89a020
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ release_publish:
git fetch origin
@bash -c 'if [ -n "$$(git tag -l $(VERSION))" ]; then echo ""; echo "Error: Release tag $(VERSION) already exists (the version has already been released)"; echo ""; false; fi'
@bash -c 'if [[ -n "$${BRANCH}" ]]; then echo $${BRANCH} >branch.tmp; elif [[ "$${VERSION#*.*.}" == "0" ]]; then echo "master" >branch.tmp; else echo "stable_$${VERSION%.*}" >branch.tmp; fi'
@bash -c 'if [ "$$(git log --format=format:%s $$(cat branch.tmp)~..$$(cat branch.tmp))" != "Release $(VERSION)" ]; then echo ""; echo "Error: Release branch has not been created yet"; echo ""; false; fi'
@bash -c 'if [ "$$(git log --format=format:%s origin/$$(cat branch.tmp)~..origin/$$(cat branch.tmp))" != "Release $(VERSION)" ]; then echo ""; echo "Error: Release PR for $(VERSION) has not been merged yet"; echo ""; false; fi'
@echo "==> This will publish $(package_name) version $(VERSION) to PyPI using target branch $$(cat branch.tmp)"
@echo -n '==> Continue? [yN] '
@bash -c 'read answer; if [ "$$answer" != "y" ]; then echo "Aborted."; false; fi'
Expand Down Expand Up @@ -447,12 +447,12 @@ start_tag:
git fetch origin
@bash -c 'if [ -n "$$(git tag -l $(VERSION)a0)" ]; then echo ""; echo "Error: Release start tag $(VERSION)a0 already exists (the new version has alreay been started)"; echo ""; false; fi'
@bash -c 'if [[ -n "$${BRANCH}" ]]; then echo $${BRANCH} >branch.tmp; elif [[ "$${VERSION#*.*.}" == "0" ]]; then echo "master" >branch.tmp; else echo "stable_$${VERSION%.*}" >branch.tmp; fi'
@bash -c 'if [ "$$(git log --format=format:%s origin/$$(cat branch.tmp)~..origin/$$(cat branch.tmp))" != "Start $(VERSION)" ]; then echo ""; echo "Error: Start PR for $(VERSION) has not been merged yet"; echo ""; false; fi'
@echo "==> This will complete the start of new version $(VERSION) using target branch $$(cat branch.tmp)"
@echo -n '==> Continue? [yN] '
@bash -c 'read answer; if [ "$$answer" != "y" ]; then echo "Aborted."; false; fi'
bash -c 'git checkout $$(cat branch.tmp)'
git pull
@bash -c 'if [ "$$(git log --format=format:%s $$(cat branch.tmp)~..$$(cat branch.tmp))" != "Start $(VERSION)" ]; then echo ""; echo "Error: Start PR for $(VERSION) has not been merged yet"; echo ""; false; fi'
git tag -f $(VERSION)a0
git push -f --tags
git branch -D start_$(VERSION)
Expand Down
2 changes: 2 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Released: 2024-10-09

* Fixed incorrect check for start branch in 'make start_tag'. (`#638 <https://github.com/zhmcclient/zhmc-prometheus-exporter/issues/638>`_)

* Fixed incorrect check for release branch in 'make release_publish'.

**Enhancements:**

* Improved build of the Docker image: It now uses the package version as the
Expand Down

0 comments on commit a89a020

Please sign in to comment.