From 399ac0e9eaba67dbf9b8f1e6568fab4634c9eb59 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Thu, 6 Aug 2026 07:56:22 +0200 Subject: [PATCH] Serve the CI pipeline from the update server (marker config) --- .woodpecker.yaml | 41 +++-------------------------------------- Makefile | 46 +--------------------------------------------- 2 files changed, 4 insertions(+), 83 deletions(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 334d9dc..a09abe3 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -1,38 +1,3 @@ -steps: - - name: version - image: alpine - commands: - - apk add --no-cache git make jq - - make ci-version - - - name: export - image: git.teletypegames.org/internal/love-builder:latest - pull: true - commands: - - make ci-export - - - name: binaries - image: git.teletypegames.org/internal/love-builder:latest - pull: true - commands: - - make ci-binaries - - - name: upload - 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 \ No newline at end of file +# The CI pipeline is served by the update server: GET /build/config?platform=love +platform: love +name: love2ddemo diff --git a/Makefile b/Makefile index ecf6d14..840d36a 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,6 @@ OUTPUT_LOVE = $(DIST_DIR)/$(LOVE_NAME) OUTPUT_ZIP = $(PROJECT)-$(VERSION).love.zip OUTPUT_WEB_ZIP = $(PROJECT)-$(VERSION).html.zip -VERSION_FILE = .version - # The love-builder CI image pre-fetches love.js here; local builds fall # back to downloading it from GitHub. LOVEJS_URL = https://github.com/2dengine/love.js/archive/refs/heads/master.zip @@ -168,46 +166,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_LOVE="$(PROJECT)-$$VERSION.love.zip"; \ - FILE_WEB="$(PROJECT)-$$VERSION.html.zip"; \ - META_SRC="metadata.json"; \ - META_DST="$(PROJECT)-$$VERSION.metadata.json"; \ - cp $$META_SRC $$META_DST; \ - BINS=""; \ - for slug in $(BINARY_SLUGS); do \ - [ -f "$(PROJECT)-$$VERSION-$$slug.zip" ] && BINS="$$BINS $(PROJECT)-$$VERSION-$$slug.zip"; \ - done; \ - for f in $$FILE_LOVE $$FILE_WEB $$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=love&version=$$VERSION"; \ - curl -fsS -X POST -H "X-Update-Secret: $(UPDATE_SECRET)" "$(UPDATE_SERVER)/build/publish?name=$(PROJECT)&platform=love-web&version=$$VERSION" - -.PHONY: all build love web export binaries binary-win binary-mac binary-linux watch clean ci-version ci-export ci-binaries ci-upload ci-publish \ No newline at end of file +.PHONY: all build love web export binaries binary-win binary-mac binary-linux watch clean