From 3d384416facf63cd3f5d8c289f9ad850b3375336 Mon Sep 17 00:00:00 2001 From: Klemek Date: Wed, 4 Jun 2025 16:21:44 +0200 Subject: [PATCH] feat: release tool (#3) * untested release tool * update PHONY * show diff and fix v --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cca2622..30e7ad9 100644 --- a/Makefile +++ b/Makefile @@ -21,4 +21,15 @@ time: build .PHONY: valgrind valgrind: build - valgrind --leak-check=full -s ./build/$(TARGET) $(TEST_ARGS) \ No newline at end of file + valgrind --leak-check=full -s ./build/$(TARGET) $(TEST_ARGS) + +.PHONY: release +release: clean build time + @echo -n "Version (x.y.z): " + @read VERSION; \ + sed -i "s/#define VERSION.*/#define VERSION \"v$$VERSION\"/g" ./src/const.h; \ + git add ./src/const.h; \ + git diff origin/master; \ + git commit -m "$(TARGET) v$$VERSION"; \ + git tag v$$VERSION -m "$(TARGET) v$$VERSION" + @echo updated ./src/const.h and tagged version