Move version definition into command package, include build timestamp, add /api/info endpoint
This commit is contained in:
3
Makefile
3
Makefile
@@ -1,5 +1,6 @@
|
||||
TARGETS = darwin/amd64 darwin/386 linux/amd64 linux/386 windows/amd64 windows/386
|
||||
GIT_COMMIT = $(shell git rev-parse HEAD)
|
||||
BUILD_TIME = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ" | tr -d '\n')
|
||||
DOCKER_RELEASE_TAG = "sosedoff/pgweb:$(shell git describe --abbrev=0 --tags | sed 's/v//')"
|
||||
BINDATA_IGNORE = $(shell git ls-files -io --exclude-standard $< | sed 's/^/-ignore=/;s/[.]/[.]/g')
|
||||
|
||||
@@ -41,7 +42,7 @@ build: assets
|
||||
release: assets
|
||||
gox \
|
||||
-osarch="$(TARGETS)" \
|
||||
-ldflags "-X main.GitCommit $(GIT_COMMIT)" \
|
||||
-ldflags "-X github.com/sosedoff/pgweb/pkg/command.GitCommit $(GIT_COMMIT) -X github.com/sosedoff/pgweb/pkg/command.BuildTime $(BUILD_TIME)" \
|
||||
-output="./bin/pgweb_{{.OS}}_{{.Arch}}"
|
||||
|
||||
bootstrap:
|
||||
|
||||
Reference in New Issue
Block a user