From c6ca2455e46f08182083849a81d52e131339c6b7 Mon Sep 17 00:00:00 2001 From: Victoria Fierce Date: Sat, 18 Feb 2023 13:44:43 +0100 Subject: [PATCH] build: add version to pack.mcmeta --- .woodpecker.yaml => .woodpecker.yml | 9 +++++++-- Makefile | 3 +++ pack.mcmeta | 2 +- pack.mcmeta.in | 6 ++++++ 4 files changed, 17 insertions(+), 3 deletions(-) rename .woodpecker.yaml => .woodpecker.yml (61%) create mode 100644 pack.mcmeta.in diff --git a/.woodpecker.yaml b/.woodpecker.yml similarity index 61% rename from .woodpecker.yaml rename to .woodpecker.yml index a703bed..10f3db6 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yml @@ -1,7 +1,8 @@ pipeline: build: - image: alpine + image: alpine:3.13 commands: + - apk add zip make - make publish: image: plugins/gitea-release @@ -9,4 +10,8 @@ pipeline: api_key: from_secret: GITEA_KEY base_url: https://gitea.malloc.hackerbots.net/ - files: *.zip *.sha1 + files: + - ./*.zip + - ./*.sha1 + when: + event: tag diff --git a/Makefile b/Makefile index e7a3593..2cf18d8 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ BUILD_VERSION:=$(shell git describe --tags) all: malloc-data-$(BUILD_VERSION).zip malloc-data-$(BUILD_VERSION).zip.sha1 +pack.mcmeta: pack.mcmeta.in + sed -e 's/@VERSION@/$(BUILD_VERSION)/g' $< > $@ + malloc-data-$(BUILD_VERSION).zip: pack.mcmeta zip -r $@ pack.mcmeta data diff --git a/pack.mcmeta b/pack.mcmeta index 0599153..2ab00cc 100644 --- a/pack.mcmeta +++ b/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { "pack_format": 10, - "description": "Malloc Minecraft Item Functions (1.0.0)" + "description": "Malloc Minecraft Item Functions (v1.0.0-1-gf988858)" } } diff --git a/pack.mcmeta.in b/pack.mcmeta.in new file mode 100644 index 0000000..8789d59 --- /dev/null +++ b/pack.mcmeta.in @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 10, + "description": "Malloc Minecraft Item Functions (@VERSION@)" + } +}