feat: release tool (#3)

* untested release tool

* update PHONY

* show diff and fix v
This commit is contained in:
2025-06-04 16:21:44 +02:00
committed by GitHub
parent 61d1b0f7e4
commit 3d384416fa
+12 -1
View File
@@ -21,4 +21,15 @@ time: build
.PHONY: valgrind .PHONY: valgrind
valgrind: build valgrind: build
valgrind --leak-check=full -s ./build/$(TARGET) $(TEST_ARGS) 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