diff --git a/.gitignore b/.gitignore index d6b5cd9..47ce09a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea/ +/cacert-idp /static certs/ idp.toml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9d54b33 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +GOFILES = $(wildcard */*.go) +TEMPLATES = $(wildcard templates/*.gohtml) +TRANSLATIONS = $(wildcard active.*.toml) + +all: cacert-idp + +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-idp: go.sum $(GOFILES) $(TEMPLATES) translations + go build -o $@ ./cmd/idp.go + +clean: + rm -f cacert-idp + +.PHONY: all translations clean +