summarylogtreecommitdiffstats
path: root/Makefile
blob: db7a57114e2f4814ebf684b83ff0b3eacfe7f2d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24


srcinfo:
	makepkg --printsrcinfo > .SRCINFO

integrity:
	rm -rf metalctl-*
	makepkg -g

generate:
	@sed -i -r "s/pkgver=.*/pkgver=$$VER/g" PKGBUILD
	@sed -i -r "s/md5sums=.*/md5sums=(\\'$$MD5\\')/g" PKGBUILD

.ONESHELL:
specificrelease:
	@export VER=0.11.0
	@export MD5=6db012adc46350e49ebcc0d559cd0a4e
	@make generate srcinfo

.ONESHELL:
latestrelease:
	@export VER=$(shell curl -sL https://api.github.com/repos/metal-stack/metalctl/releases/latest | jq -r ".name" | cut -c 2-)
	@export MD5=$(shell curl -sL https://api.github.com/repos/metal-stack/metalctl/releases/latest | jq -r ".assets[] | select(.name | contains(\"linux-amd64.md5\")) | .browser_download_url" | wget -q -i - -O - | cut -d' ' -f1)
	@make generate srcinfo