59 lines
1.2 KiB
Makefile
59 lines
1.2 KiB
Makefile
.DEFAULT_GOAL := all
|
|
|
|
# seems superfluous
|
|
#.PHONY: fmt vet build clean
|
|
|
|
tools:
|
|
go install github.com/jstemmer/go-junit-report/v2@latest
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
|
|
|
|
generate:
|
|
templ generate
|
|
cp LICENSE pkg/server/ui
|
|
cp licenses/LICENSE* pkg/server/ui
|
|
|
|
vet: fmt
|
|
go vet ./...
|
|
|
|
test: build
|
|
mkdir -p testout
|
|
go test -count=1 -coverprofile=testout/coverage.out -json ${TESTFLAGS} ./pkg/... ./cmd/... 2>&1 | \
|
|
tee testout/tests.json | sh filtertestjson
|
|
go-junit-report < testout/tests.json > testout/junit.xml
|
|
|
|
integrationtest: build
|
|
mkdir -p testout
|
|
go test -count=1 ${TESTFLAGS} ./integrationtest/... -json 2>&1 | \
|
|
tee testout/integrationtests.json | sh filtertestjson
|
|
go-junit-report < testout/integrationtests.json > testout/integrationtest.xml
|
|
|
|
build: generate vet
|
|
mkdir -p bin
|
|
go build -o bin ./cmd/...
|
|
|
|
buildwin:
|
|
mkdir -p bin
|
|
GOOS=windows GOARCH=amd64 go build -o bin ./cmd/...
|
|
|
|
clean:
|
|
rm -rf bin
|
|
rm -rf static/icons
|
|
rm -f pkg/server/ui/LICENSE*
|
|
|
|
static/icons/.downloaded:
|
|
./getbootstrapicons.sh
|
|
touch static/icons/.downloaded
|
|
|
|
icons: static/icons/.downloaded
|
|
|
|
all: icons build buildwin
|
|
|
|
images:
|
|
docker compose --profile build build
|
|
|
|
push: images
|
|
docker compose --profile build push
|