From ef0fcd63c5258e71b23aa7eaccc5b78f0418d101 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Thu, 6 Aug 2026 08:09:39 +0200 Subject: [PATCH] Serve the CI pipeline from the update server (marker config) --- .woodpecker.yaml | 2 ++ .woodpecker.yml | 42 ------------------------------------------ Makefile | 40 +--------------------------------------- 3 files changed, 3 insertions(+), 81 deletions(-) create mode 100644 .woodpecker.yaml delete mode 100644 .woodpecker.yml diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..7fe0be6 --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,2 @@ +# The CI pipeline is served by the update server: GET /build/config?platform=ebitengine +platform: ebitengine diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index e4eeb83..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,42 +0,0 @@ -steps: - - name: version - image: alpine - commands: - - apk add --no-cache git make jq - - make ci-version - - - name: build - image: git.teletypegames.org/internal/ebitengine-builder:latest - pull: true - commands: - # in CI clone the framework next to the workspace so it resolves. - - if grep -q '=> \.\./inkwell' go.mod; then git clone https://git.teletypegames.org/games/inkwell ../inkwell; fi - - make ci-export - - - name: binaries - image: git.teletypegames.org/internal/ebitengine-builder:latest - pull: true - commands: - # önálló futáshoz is: ha a framework még nincs odaklónozva, pótoljuk - - if grep -q '=> \.\./inkwell' go.mod && [ ! -d ../inkwell ]; then git clone https://git.teletypegames.org/games/inkwell ../inkwell; fi - - make ci-binaries - - - name: artifact - image: alpine - environment: - UPDATE_SERVER: https://teletypegames.org - UPDATE_SECRET: - from_secret: update_secret_key - commands: - - apk add --no-cache make curl - - make ci-upload - - - name: publish - image: alpine - environment: - UPDATE_SERVER: https://teletypegames.org - UPDATE_SECRET: - from_secret: update_secret_key - commands: - - apk add --no-cache make curl - - make ci-publish diff --git a/Makefile b/Makefile index 34017d5..77856e8 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,6 @@ OUTPUT_WASM = $(DIST_DIR)/$(WASM_NAME) OUTPUT_JS = $(DIST_DIR)/wasm_exec.js OUTPUT_ZIP = $(PROJECT)-$(VERSION).html.zip -VERSION_FILE = .version INDEX_HTML_URL = https://git.teletypegames.org/tools/ebitengine-tools/raw/branch/master/web/index.html all: build @@ -80,41 +79,4 @@ watch: clean: rm -rf $(BIN_DIR) $(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-binaries: - @VERSION=$$(cat $(VERSION_FILE)); \ - $(MAKE) binaries VERSION=$$VERSION - -ci-upload: - @VERSION=$$(cat $(VERSION_FILE)); \ - FILE="$(PROJECT)-$$VERSION.html.zip"; \ - META_SRC="metadata.json"; \ - META_DST="$(PROJECT)-$$VERSION.metadata.json"; \ - BINS=$$(ls $(PROJECT)-$$VERSION-*.zip 2>/dev/null || true); \ - cp $$META_SRC $$META_DST; \ - for f in $$FILE $$META_DST $$BINS; 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=ebitengine&version=$$VERSION" - -.PHONY: all build wasm export watch clean binaries binary-win-x86 binary-win-x64 binary-linux-x64 binary-build ci-version ci-export ci-binaries ci-upload ci-publish +.PHONY: all build wasm export watch clean binaries binary-win-x86 binary-win-x64 binary-linux-x64 binary-build