Skip to content

Commit

Permalink
Fix release script (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua authored Oct 12, 2024
1 parent 8bf0e18 commit 06580a8
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,23 @@ clean: ## Clean unused files.
@rm -rf *.egg-info
@rm -rf htmlcov
@rm -rf .tox/
@rm -rf docs/_build
@rm -rf docs/build

.PHONY: release
release: ## Create a new tag for release.
@echo "WARNING: This operation will create s version tag and push to github"
@read -p "Version? (provide the next x.y.z semver) : " TAG
@echo "$${TAG}" > tosfs/VERSION
@$(ENV_PREFIX)gitchangelog > HISTORY.md
@git add tosfs/VERSION HISTORY.md
@git commit -m "release: version $${TAG} 🚀"
@echo "creating git tag : $${TAG}"
@git tag $${TAG}
@git push -u origin HEAD --tags
@echo "Github Actions will detect the new tag and release the new version."
@set -e; \
read -p "Version? (provide the next x.y.z semver) : " TAG; \
git checkout -b release-$${TAG}; \
echo "$${TAG}" > tosfs/VERSION; \
git log --pretty=format:"%h - %s (%an, %ad)" --date=short > HISTORY.md; \
poetry version $${TAG}; \
git add tosfs/VERSION HISTORY.md pyproject.toml; \
git commit -m "release: version $${TAG} 🚀"; \
echo "creating git tag : $${TAG}"; \
git tag $${TAG}; \
git push -u origin HEAD --tags; \
echo "Github Actions will detect the new tag and release the new version."

.PHONY: docs
docs: ## Build the documentation.
Expand Down

0 comments on commit 06580a8

Please sign in to comment.