From ee9f2788e4d6c3b3c05e7b1f6c73264d69c34d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Sun, 24 Feb 2019 20:14:25 +0100 Subject: [PATCH] Add `make version` command This makes tagging simpler. --- Makefile | 7 ++++++- docs/tutor.rst | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 00c25b4..4459104 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,14 @@ compile-requirements: ## Compile requirements files bundle: ## Bundle the tutor package in a single "dist/tutor" executable pyinstaller --onefile --name=tutor --add-data=./tutor/templates:./tutor/templates ./bin/main +dist/tutor: + $(MAKE) bundle + +version: ## Print the current tutor version + @python -c 'import io, os; about = {}; exec(io.open(os.path.join("tutor", "__about__.py"), "rt", encoding="utf-8").read(), about); print(about["__version__"])' tag: ## Create a release, update the "latest" tag and push them to origin - $(MAKE) retag TAG=$(TAG) + $(MAKE) retag TAG=$(shell make version) $(MAKE) retag TAG=latest retag: diff --git a/docs/tutor.rst b/docs/tutor.rst index 6d99424..f37a635 100644 --- a/docs/tutor.rst +++ b/docs/tutor.rst @@ -42,4 +42,4 @@ Releasing a new version - Replace "Latest" by the version name in CHANGELOG.md. - Create a commit with the version changelog. - ``git push`` -- ``make tag TAG=vxxx`` +- ``make tag``