Replace the pipeline template with a marker: the config is served by the update server
This commit is contained in:
+1
-34
@@ -11,7 +11,6 @@ DIST_DIR = dist
|
||||
WEB_DIR = $(DIST_DIR)/web
|
||||
OUTPUT_ZIP = $(PROJECT)-$(VERSION).html.zip
|
||||
|
||||
VERSION_FILE = .version
|
||||
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
|
||||
|
||||
@@ -49,36 +48,4 @@ watch:
|
||||
clean:
|
||||
rm -rf $(DIST_DIR)
|
||||
|
||||
ci-version:
|
||||
@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
|
||||
.PHONY: all build web serve export watch clean
|
||||
|
||||
Reference in New Issue
Block a user