Add Makefile
This commit adds a Makefile to automate the steps required to build the cacert-idp binary.
This commit is contained in:
parent
26447f99c9
commit
2affaa2150
2 changed files with 26 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
.idea/
|
.idea/
|
||||||
|
/cacert-idp
|
||||||
/static
|
/static
|
||||||
certs/
|
certs/
|
||||||
idp.toml
|
idp.toml
|
||||||
|
|
25
Makefile
Normal file
25
Makefile
Normal file
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue