Jan Dittberner
e9af4bfd86
All checks were successful
cacert-boardvoting/pipeline/head This commit looks good
27 lines
784 B
Makefile
27 lines
784 B
Makefile
VERSION := $(shell git describe --always --dirty=-dev)
|
|
COMMIT := $(shell git show-ref --hash refs/heads/master)
|
|
DATE := $(shell date --iso-8601=seconds --utc)
|
|
GOFILES = $(shell find . -type f -name '*.go')
|
|
UIFILES = package.json package-lock.json semantic.json $(shell find ui/semantic -type f )
|
|
|
|
all: cacert-boardvoting
|
|
|
|
cacert-boardvoting: ${GOFILES}
|
|
go build -o $@ -buildmode=pie -trimpath -ldflags " -s -w -X 'main.version=${VERSION}' -X 'main.commit=${COMMIT}' -X 'main.date=${DATE}'" ./cmd/boardvoting
|
|
|
|
test:
|
|
go test -v ./...
|
|
|
|
lint:
|
|
golangci-lint run
|
|
|
|
clean:
|
|
rm -rf cacert-boardvoting dist/ debian/README.md.gz
|
|
|
|
ui/static/semantic.min.css: ${UIFILES}
|
|
npm install
|
|
cd node_modules/fomantic-ui ; npx gulp build
|
|
|
|
ui: ui/static/semantic.min.css
|
|
|
|
.PHONY: clean all ui test lint
|