You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
967 B

GOFILES = $(shell find -type f -name '*.go')
TEMPLATES = $(wildcard ui/templates/*.gohtml)
TRANSLATIONS = $(wildcard translations/active.*.toml)
RESOURCES = ui/css ui/images ui/js
all: cacert-idp
ui/css: ../cacert_resources/static/css
cp -r ../cacert_resources/static/css ui/
ui/js: ../cacert_resources/static/js
cp -r ../cacert_resources/static/js ui/
ui/images: ../cacert_resources/static/images
cp -r ../cacert_resources/static/images ui/
go.sum: go.mod
go mod tidy
translations: $(TRANSLATIONS) $(GOFILES)
cd translations ; \
goi18n extract .. ; \
goi18n merge active.*.toml ; \
if translate.*.toml 2>/dev/null; then \
echo "missing translations"; \
goi18n merge active.*.toml translate.*.toml; \
lint: $(GOFILES)
golangci-lint run --verbose
cacert-idp: go.sum $(GOFILES) $(TEMPLATES) translations $(RESOURCES)
CGO_ENABLED=0 go build -o $@ ./cmd/idp
rm -rf cacert-idp ui/css ui/js ui/images
.PHONY: all translations clean lint