make: add version to filename
This commit is contained in:
parent
3bac929771
commit
99742a9cdb
17
.woodpecker.yml
Normal file
17
.woodpecker.yml
Normal 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:
|
||||||
|
event: tag
|
15
Makefile
15
Makefile
@ -1,12 +1,17 @@
|
|||||||
.PHONY: all
|
.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
|
all: malloc-items-$(BUILD_VERSION).zip malloc-items-$(BUILD_VERSION).zip.sha1
|
||||||
zip -r malloc-items-1.0.zip pack.mcmeta assets
|
|
||||||
|
|
||||||
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 $< > $@
|
sha1sum $< > $@
|
||||||
|
|
||||||
clean:
|
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
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"pack": {
|
"pack": {
|
||||||
"pack_format": 9,
|
"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
6
pack.mcmeta.in
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 9,
|
||||||
|
"description": "The Magic of Malloc (@VERSION@)"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user