Jan Dittberner
44e18ca3a5
The primary change in this commit is the introduction of consent management. A few minor improvements have been made: - move common header to ui/templates/base.gohtml - add an I18NService to unify localization - add a handlers.getLocalizer function - fix translation extraction and merging in Makefile - add a new AuthMiddleware to centralize client certificate authentication - move client certificate handling to internal/handlers/security.go - improver error handling, allow localization of HTTP error messages
37 lines
1 KiB
Makefile
37 lines
1 KiB
Makefile
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)
|
|
if [ ! -z "$(wildcard translations/translate.*.toml)" ]; then \
|
|
echo "missing translations"; \
|
|
goi18n merge -outdir translations translations/active.*.toml translations/translate.*.toml; \
|
|
fi ; \
|
|
goi18n extract -outdir translations . ; \
|
|
goi18n merge -outdir translations translations/active.*.toml
|
|
|
|
lint: $(GOFILES)
|
|
golangci-lint run --verbose
|
|
|
|
cacert-idp: go.sum $(GOFILES) $(TEMPLATES) translations $(RESOURCES)
|
|
CGO_ENABLED=0 go build -o $@ ./cmd/idp
|
|
|
|
clean:
|
|
rm -rf cacert-idp ui/css ui/js ui/images
|
|
|
|
.PHONY: all translations clean lint
|