Pin the software name in the marker and drop the ci-* targets
ci/woodpecker/push/phaser Pipeline was successful
ci/woodpecker/push/phaser Pipeline was successful
This commit is contained in:
@@ -1 +1,3 @@
|
|||||||
|
# The CI pipeline is served by the update server: GET /build/config?platform=phaser
|
||||||
platform: phaser
|
platform: phaser
|
||||||
|
name: phaserdemo
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ DIST_DIR = dist
|
|||||||
WEB_DIR = $(DIST_DIR)/web
|
WEB_DIR = $(DIST_DIR)/web
|
||||||
OUTPUT_ZIP = $(PROJECT)-$(VERSION).html.zip
|
OUTPUT_ZIP = $(PROJECT)-$(VERSION).html.zip
|
||||||
|
|
||||||
VERSION_FILE = .version
|
|
||||||
PHASER_JS_URL = https://cdn.jsdelivr.net/npm/phaser@$(PHASER_VERSION)/dist/phaser.min.js
|
PHASER_JS_URL = https://cdn.jsdelivr.net/npm/phaser@$(PHASER_VERSION)/dist/phaser.min.js
|
||||||
INDEX_HTML_URL = https://git.teletypegames.org/tools/phaser-tools/raw/branch/master/web/index.html
|
INDEX_HTML_URL = https://git.teletypegames.org/tools/phaser-tools/raw/branch/master/web/index.html
|
||||||
|
|
||||||
@@ -49,36 +48,4 @@ watch:
|
|||||||
clean:
|
clean:
|
||||||
rm -rf $(DIST_DIR)
|
rm -rf $(DIST_DIR)
|
||||||
|
|
||||||
ci-version:
|
.PHONY: all build web serve export watch clean
|
||||||
@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:
|
|
||||||
@VERSION=$$(cat $(VERSION_FILE)); \
|
|
||||||
$(MAKE) export VERSION=$$VERSION
|
|
||||||
|
|
||||||
ci-upload:
|
|
||||||
@VERSION=$$(cat $(VERSION_FILE)); \
|
|
||||||
FILE="$(PROJECT)-$$VERSION.html.zip"; \
|
|
||||||
META_SRC="metadata.json"; \
|
|
||||||
META_DST="$(PROJECT)-$$VERSION.metadata.json"; \
|
|
||||||
cp $$META_SRC $$META_DST; \
|
|
||||||
for f in $$FILE $$META_DST; do \
|
|
||||||
curl -fsS -H "X-Update-Secret: $(UPDATE_SECRET)" \
|
|
||||||
-F "file=@$$f" \
|
|
||||||
"$(UPDATE_SERVER)/build/upload?name=$(PROJECT)&version=$$VERSION" || exit 1; \
|
|
||||||
done
|
|
||||||
|
|
||||||
ci-publish:
|
|
||||||
@VERSION=$$(cat $(VERSION_FILE)); \
|
|
||||||
curl -fsS -X POST -H "X-Update-Secret: $(UPDATE_SECRET)" "$(UPDATE_SERVER)/build/publish?name=$(PROJECT)&platform=phaser&version=$$VERSION"
|
|
||||||
|
|
||||||
.PHONY: all build web serve export watch clean ci-version ci-export ci-upload ci-publish
|
|
||||||
|
|||||||
Reference in New Issue
Block a user