converge/Makefile

58 lines
1.1 KiB
Makefile

.DEFAULT_GOAL := all
# seems superfluous
#.PHONY: fmt vet build clean
tools:
GOPROXY=direct go install git.wamblee.org/public/gotools/cmd/go2junit@main
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 | \
go2junit testout/junit
integrationtest: build
mkdir -p testout
go test -count=1 ${TESTFLAGS} ./integrationtest/... -json 2>&1 | \
go2junit testout/integrationtest
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*
rm -rf testout
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