2017-04-18 14:07:54 +00:00
|
|
|
VERSION := $(shell git describe --always --dirty=-dev)
|
2021-04-14 17:02:44 +00:00
|
|
|
COMMIT := $(shell git show-ref --hash refs/heads/master)
|
|
|
|
DATE := $(shell date --iso-8601=seconds --utc)
|
2018-03-29 18:08:41 +00:00
|
|
|
GOFILES = $(shell find . -type f -name '*.go')
|
2022-05-08 14:13:50 +00:00
|
|
|
UIFILES = package.json package-lock.json semantic.json $(shell find ui/semantic -type f )
|
2017-04-18 14:07:54 +00:00
|
|
|
|
2018-03-29 18:08:41 +00:00
|
|
|
all: cacert-boardvoting
|
|
|
|
|
2021-02-28 17:25:17 +00:00
|
|
|
cacert-boardvoting: ${GOFILES}
|
2022-10-15 17:58:58 +00:00
|
|
|
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
|
2017-04-18 14:07:54 +00:00
|
|
|
|
|
|
|
clean:
|
2022-10-15 19:31:11 +00:00
|
|
|
rm -rf cacert-boardvoting dist/ debian/README.md.gz
|
2017-04-18 14:07:54 +00:00
|
|
|
|
2022-10-15 18:18:37 +00:00
|
|
|
ui/static/semantic.min.css: ${UIFILES}
|
2022-05-08 14:13:50 +00:00
|
|
|
npm install
|
|
|
|
cd node_modules/fomantic-ui ; npx gulp build
|
2018-03-29 18:08:41 +00:00
|
|
|
|
2022-10-15 18:18:37 +00:00
|
|
|
ui: ui/static/semantic.min.css
|
|
|
|
|
2022-10-15 19:31:11 +00:00
|
|
|
.PHONY: clean all ui test lint
|