make: add version to filename
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
Victoria Fierce 2023-02-18 14:03:06 +01:00
parent 3bac929771
commit 2e6836fb1a
4 changed files with 34 additions and 6 deletions

17
.woodpecker.yml Normal file
View File

@ -0,0 +1,17 @@
pipeline:
build:
image: alpine:3.13
commands:
- apk add zip make
- make
publish:
image: plugins/gitea-release
settings:
api_key:
from_secret: GITEA_KEY
base_url: https://gitea.malloc.hackerbots.net/
files:
- ./*.zip
- ./*.sha1
when:
branch: master

View File

@ -1,12 +1,17 @@
.PHONY: all
all: malloc-items-1.0.zip malloc-items-1.0.zip.sha1
BUILD_VERSION:=$(shell git describe --tags)
malloc-items-1.0.zip: pack.mcmeta
zip -r malloc-items-1.0.zip pack.mcmeta assets
all: malloc-items-$(BUILD_VERSION).zip malloc-items-$(BUILD_VERSION).zip.sha1
malloc-items-1.0.zip.sha1: malloc-items-1.0.zip
pack.mcmeta: pack.mcmeta.in
sed -e 's/@VERSION@/$(BUILD_VERSION)/g' $< > $@
malloc-items-$(BUILD_VERSION).zip: pack.mcmeta
zip -r malloc-items-$(BUILD_VERSION).zip pack.mcmeta assets
malloc-items-$(BUILD_VERSION).zip.sha1: malloc-items-$(BUILD_VERSION).zip
sha1sum $< > $@
clean:
rm -f malloc-items-1.0.zip malloc-items-1.0.zip.sha1
rm -f malloc-items-$(BUILD_VERSION).zip malloc-items-$(BUILD_VERSION).zip.sha1

View File

@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 9,
"description": "The Magic of Malloc (1.0.0)"
"description": "The Magic of Malloc (v1.0.0)"
}
}

6
pack.mcmeta.in Normal file
View File

@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 9,
"description": "The Magic of Malloc (@VERSION@)"
}
}