new version handling
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2026-01-30 15:48:49 +01:00
parent 295ebecbc7
commit c9b749171b
2 changed files with 11 additions and 2 deletions

View File

@@ -44,7 +44,15 @@ clean:
rm -rf $(BIN_DIR) $(DIST_DIR)
ci-version:
@VERSION=$$(git describe --tags --dirty --always); \
@if [ -f metadata.json ]; then \
VERSION=$$(jq -r '.version' metadata.json); \
else \
VERSION=$$(git rev-parse --short HEAD); \
fi; \
BRANCH=$$(git rev-parse --abbrev-ref HEAD); \
if [ "$$BRANCH" != "main" ] && [ "$$BRANCH" != "master" ]; then \
VERSION="dev-$$VERSION-$$BRANCH"; \
fi; \
echo $$VERSION > $(VERSION_FILE)
ci-export:

View File

@@ -4,5 +4,6 @@
"author": "Teletype Games",
"desc": "It's a simple demo program in Ebitengine",
"site": "https://git.teletype.hu/games/ebitenginedemo",
"license": "MIT License"
"license": "MIT License",
"version": "1.0.0"
}