2022-11-03 22:15:03 +01:00
|
|
|
PACKAGE_VERSION ?= $(shell git describe --always | rev | cut -d '/' -f 1 | rev)
|
|
|
|
NFPM_PACKAGER ?= deb
|
|
|
|
|
2021-09-27 16:22:10 +02:00
|
|
|
build: clean generate
|
|
|
|
CGO_ENABLED=0 misc/script/build
|
|
|
|
|
|
|
|
generate:
|
|
|
|
go generate ./...
|
2021-09-17 11:09:53 +02:00
|
|
|
|
2021-09-17 11:46:07 +02:00
|
|
|
clean:
|
|
|
|
rm -rf bin
|
|
|
|
|
2022-11-03 22:15:03 +01:00
|
|
|
package: dist
|
|
|
|
PACKAGE_VERSION=$(PACKAGE_VERSION) \
|
|
|
|
nfpm package \
|
|
|
|
--config misc/packaging/nfpm.yml \
|
|
|
|
--target ./dist \
|
|
|
|
--packager $(NFPM_PACKAGER)
|
|
|
|
|
|
|
|
dist:
|
|
|
|
mkdir -p dist
|
|
|
|
|
2021-09-17 11:09:53 +02:00
|
|
|
.PHONY: build
|