From b460c6864140e296da87a3256c0092b1a0bc9610 Mon Sep 17 00:00:00 2001 From: Ein Anderssono Date: Thu, 11 Jun 2026 20:37:30 +0200 Subject: [PATCH] add pipeline and tea release targets --- Makefile | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index ac3c104..49289a6 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ STUB_LIB := $(BRIDGE_DIR)/libphotokit_bridge_stub.a GITEA_HOST := gitea-1.tail82444.ts.net GITEA_REPO := tools/photocli -.PHONY: all build clean test coverage tag release +.PHONY: all build clean test coverage tag release pipeline all: build @@ -48,17 +48,11 @@ tag: git tag v$(VERSION) git push origin v$(VERSION) -release: build tag -ifndef GITEA_TOKEN - $(error GITEA_TOKEN is required. Set it with: export GITEA_TOKEN=your-token) -endif - curl -sf -X POST "https://$(GITEA_HOST)/api/v1/repos/$(GITEA_REPO)/releases" \ - -H "Authorization: token $(GITEA_TOKEN)" \ - -H "Content-Type: application/json" \ - -d '{"tag_name":"v$(VERSION)","name":"v$(VERSION)","body":"photoscli v$(VERSION)"}' | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['id'])" > /tmp/_photoscli_release_id - @echo "created release v$(VERSION)" - curl -sf -X POST "https://$(GITEA_HOST)/api/v1/repos/$(GITEA_REPO)/releases/$$(cat /tmp/_photoscli_release_id)/assets?name=photoscli" \ - -H "Authorization: token $(GITEA_TOKEN)" \ - -F "attachment=@$(BINARY)" - @echo "uploaded $(BINARY) to release v$(VERSION)" - @rm -f /tmp/_photoscli_release_id \ No newline at end of file +release: + tea releases create --repo $(GITEA_REPO) --tag v$(VERSION) --title "v$(VERSION)" --asset $(BINARY) + +pipeline: clean test build + @echo "--- verifying version ---" + $(BINARY) version + @echo "--- all checks passed, ready to release ---" + @echo "run: make release" \ No newline at end of file