mirror of
https://codeberg.org/scip/ephemerup.git
synced 2025-12-17 04:30:57 +01:00
changes:
- added unit tests
- put all subcmds into one file
- use io.Writer for output, better for testing
- added upload form support
- added api docs
- generalized db engine
- added mail notify support for forms
- enhanced server/SetupAuthStore() to also look up form ids
- added form template (put into .go file by Makefile
- renamed project
This commit is contained in:
19
Makefile
19
Makefile
@@ -27,15 +27,15 @@ COMMIT = $(shell git rev-parse --short=8 HEAD)
|
||||
BUILD = $(shell date +%Y.%m.%d.%H%M%S)
|
||||
VERSION := $(if $(filter $(BRANCH), development),$(version)-$(BRANCH)-$(COMMIT)-$(BUILD),$(version))
|
||||
HAVE_POD := $(shell pod2text -h 2>/dev/null)
|
||||
DAEMON := cenod
|
||||
DAEMON := ephemerupd
|
||||
|
||||
all: buildlocal buildlocalctl
|
||||
all: cmd/formtemplate.go buildlocal buildlocalctl
|
||||
|
||||
buildlocalctl:
|
||||
make -C upctl
|
||||
|
||||
buildlocal:
|
||||
go build -ldflags "-X 'github.com/tlinden/cenophane/cfg.VERSION=$(VERSION)'" -o $(DAEMON)
|
||||
go build -ldflags "-X 'github.com/tlinden/ephemerup/cfg.VERSION=$(VERSION)'" -o $(DAEMON)
|
||||
|
||||
buildimage: clean
|
||||
docker-compose --verbose build
|
||||
@@ -60,15 +60,15 @@ test:
|
||||
|
||||
singletest:
|
||||
@echo "Call like this: ''make singletest TEST=TestX1 MOD=lib"
|
||||
go test -run $(TEST) github.com/tlinden/cenophane/$(MOD)
|
||||
go test -run $(TEST) github.com/tlinden/ephemerup/$(MOD)
|
||||
|
||||
cover-report:
|
||||
go test ./... -cover -coverprofile=coverage.out
|
||||
go tool cover -html=coverage.out
|
||||
|
||||
show-versions: buildlocal
|
||||
@echo "### cenod version:"
|
||||
@./cenod --version
|
||||
@echo "### ephemerupd version:"
|
||||
@./ephemerupd --version
|
||||
|
||||
@echo
|
||||
@echo "### go module versions:"
|
||||
@@ -80,3 +80,10 @@ show-versions: buildlocal
|
||||
|
||||
goupdate:
|
||||
go get -t -u=patch ./...
|
||||
|
||||
cmd/%.go: templates/%.html
|
||||
echo "package cmd" > cmd/$*.go
|
||||
echo >> cmd/$*.go
|
||||
echo "const formtemplate = \`" >> cmd/$*.go
|
||||
cat templates/$*.html >> cmd/$*.go
|
||||
echo "\`" >> cmd/$*.go
|
||||
|
||||
Reference in New Issue
Block a user