Skip to content

Commit

Permalink
build(makefile): add command for updating release version (#162)
Browse files Browse the repository at this point in the history
* build(makefile): add command for updating release version

* build(makefile): update to include new commands for auto generating a new version file

* build(makefile): update the new version branch command to include bump in the branch
  • Loading branch information
RodrigoGonzalez authored Aug 20, 2023
1 parent 5103079 commit 4599993
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,13 @@ commit: pre-commit tests clean ## Commit changes
./scripts/commit.sh

bump: ## Bump version and update changelog
poetry run cz bump --changelog --check-consistency --annotated-tag
poetry run cz bump --changelog --check-consistency --annotated-tag --retry
git push -u origin HEAD --follow-tags

.PHONY: pre-commit commit bump
dry-run-bump: ## Generate the changes that would be made by bumping the version
poetry run cz bump --dry-run

.PHONY: pre-commit commit bump dry-run-bump

# =============================================================================
# TESTING
Expand Down Expand Up @@ -198,7 +201,11 @@ new-branch: check-branch-name ## Create a new branch
new-feat-branch: check-branch-name ## Create a new feature branch
git checkout -b feat/$(BRANCH)_$(commit_count)

.PHONY: check-branch-name new-branch new-feat-branch
new-version-branch: check-branch-name ## Create a new version branch
NEW_VERSION=$(shell poetry run cz bump --dry-run | grep 'bump: version' | awk -F ' ' '{print $$NF}'); \
git checkout -b bump/v$$NEW_VERSION

.PHONY: check-branch-name new-branch new-feat-branch new-version-branch

# =============================================================================
# SELF DOCUMENTATION
Expand Down

0 comments on commit 4599993

Please sign in to comment.