Jan Dittberner
c2eef9cf7c
Some checks failed
cacert-boardvoting/pipeline/head There was a failure building this commit
This commit is a refactoring of code that has been located in the main package. We introduce separate packages for the main application, jobs, notifications, and request handlers. Dependencies are injected from the main application, this will make testing easier.
25 lines
No EOL
695 B
Makefile
25 lines
No EOL
695 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 -f cacert-boardvoting
|
|
|
|
ui: ${UIFILES}
|
|
npm install
|
|
cd node_modules/fomantic-ui ; npx gulp build
|
|
|
|
.PHONY: clean all ui test |