infra: Added versioning

This commit is contained in:
2025-12-20 04:04:21 +01:00
parent 4dadb9c4cf
commit 39acf8e1f2
4 changed files with 244 additions and 20 deletions

25
Makefile Normal file
View File

@@ -0,0 +1,25 @@
# Versioning
check-branch-is-main:
@current_branch=$$(git rev-parse --abbrev-ref HEAD); \
if [ "$$current_branch" != "main" ]; then \
echo "Error: not on the main branch" \
exit 1; \
fi
BUMP = cd brain && poetry run bump-my-version bump
.PHONY: help patch minor major
help:
@echo "Versioning commands :"
@echo " make patch : Bump version 0.0.1 (bugfix)"
@echo " make minor : Bump version 0.1.0 (feature)"
@echo " make major : Bump version 1.0.0 (breaking change)"
patch: check-branch-is-main
SKIP=all $(BUMP) patch
minor: check-branch-is-main
SKIP=all $(BUMP) minor
major: check-branch-is-main
SKIP=all $(BUMP) major