diff --git a/Makefile b/Makefile index 4a89aa66c..5f7de2e36 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,10 @@ CLONE_URL=github.com/pilosa/pilosa MOD_VERSION=v2 VERSION := $(shell git describe --tags 2> /dev/null || echo unknown) +MAJOR_VERSION=$(shell cut -d '.' -f1 <<<$(VERSION) | cut -d 'v' -f2) +MAJOR_VERSION_INCREMENT=$(shell echo `expr $(MAJOR_VERSION) + 1`) +MINOR_VERSION=$(shell cut -d'.' -f2-3 <<<$(VERSION)) +RELEASE_VERSION=$(shell echo v$(MAJOR_VERSION_INCREMENT).$(MINOR_VERSION)) VARIANT = Molecula GO=go GOOS=$(shell $(GO) env GOOS) @@ -13,7 +17,7 @@ BRANCH_ID := $(BRANCH)-$(GOOS)-$(GOARCH) BUILD_TIME := $(shell date -u +%FT%T%z) SHARD_WIDTH = 20 COMMIT := $(shell git describe --exact-match >/dev/null 2>&1 || git rev-parse --short HEAD) -LDFLAGS="-X github.com/molecula/featurebase/v2.Version=$(VERSION) -X github.com/molecula/featurebase/v2.BuildTime=$(BUILD_TIME) -X github.com/molecula/featurebase/v2.Variant=$(VARIANT) -X github.com/molecula/featurebase/v2.Commit=$(COMMIT) -X github.com/molecula/featurebase/v2.TrialDeadline=$(TRIAL_DEADLINE)" +LDFLAGS="-X github.com/molecula/featurebase/v2.Version=$(RELEASE_VERSION) -X github.com/molecula/featurebase/v2.BuildTime=$(BUILD_TIME) -X github.com/molecula/featurebase/v2.Variant=$(VARIANT) -X github.com/molecula/featurebase/v2.Commit=$(COMMIT) -X github.com/molecula/featurebase/v2.TrialDeadline=$(TRIAL_DEADLINE)" GO_VERSION=1.16.3 DOCKER_BUILD= # set to 1 to use `docker-build` instead of `build` when creating a release BUILD_TAGS += shardwidth$(SHARD_WIDTH) diff --git a/http/handler.go b/http/handler.go index 05e97f583..59a3c3162 100644 --- a/http/handler.go +++ b/http/handler.go @@ -527,7 +527,7 @@ func newStatikHandler(h *Handler) statikHandler { func (s statikHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if strings.HasPrefix(r.UserAgent(), "curl") { - msg := "Welcome. Pilosa v" + s.handler.api.Version() + " is running. Visit https://www.pilosa.com/docs/ for more information." + msg := "Welcome. FeatureBase v" + s.handler.api.Version() + " is running. Visit https://docs.molecula.cloud for more information." if s.statikFS != nil { msg += " Try the Web UI by visiting this URL in your browser." }