Add Makefile
This commit adds a Makefile to automate the build process for the cacert-oidc-registration binary.main
parent
0c88fb5447
commit
be9006546d
@ -0,0 +1,25 @@
|
|||||||
|
GOFILES = $(wildcard */*.go)
|
||||||
|
TEMPLATES = $(wildcard templates/*.gohtml)
|
||||||
|
TRANSLATIONS = $(wildcard active.*.toml)
|
||||||
|
|
||||||
|
all: cacert-oidc-registration
|
||||||
|
|
||||||
|
go.sum: go.mod
|
||||||
|
go mod tidy
|
||||||
|
|
||||||
|
translations: $(TRANSLATIONS) $(GOFILES)
|
||||||
|
goi18n extract .
|
||||||
|
goi18n merge active.*.toml
|
||||||
|
if translate.*.toml 2>/dev/null; then \
|
||||||
|
echo "missing translations"; \
|
||||||
|
goi18n merge active.*.toml translate.*.toml; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
cacert-oidc-registration: go.sum $(GOFILES) $(TEMPLATES) translations
|
||||||
|
go build -o $@ ./cmd/registration.go
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f cacert-oidc-registration
|
||||||
|
|
||||||
|
.PHONY: all translations clean
|
||||||
|
|
Loading…
Reference in New Issue