diff --git a/Dockerfile b/Dockerfile index b145465b6..6d86de974 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY . /go/src/github.com/pilosa/pilosa RUN cd /go/src/github.com/pilosa/pilosa \ && make vendor \ - && CGO_ENABLED=0 go install -a -ldflags "$ldflags" github.com/pilosa/pilosa/cmd/pilosa + && CGO_ENABLED=0 go install -tags release -a -ldflags "$ldflags" github.com/pilosa/pilosa/cmd/pilosa FROM scratch diff --git a/Makefile b/Makefile index e1ed7c5d5..48c0075a8 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ cover-viz: cover go tool cover -html=build/coverage/all.out pilosa: vendor - go build -ldflags $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosa + go build -tags release -ldflags $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosa release-build: vendor ifdef DOCKER_BUILD @@ -114,7 +114,7 @@ docker: @echo "Created image: pilosa:$(VERSION)" docker-build: - docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) -e GOOS=$(GOOS) -e GOARCH=$(GOARCH) $(DOCKER_GOLANG_IMAGE) go build -ldflags $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosa + docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) -e GOOS=$(GOOS) -e GOARCH=$(GOARCH) $(DOCKER_GOLANG_IMAGE) go build -tags release -ldflags $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosa docker-test: docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) $(DOCKER_GOLANG_IMAGE) go test $(TESTFLAGS) $(PKGS) diff --git a/README.md b/README.md index e28a6f7cd..5ae041dfd 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ - [Get Support](#get-support) - [Contributing](#contributing) +Want to contribute? One of the easiest ways is to [tell us how you're using (or want to use) Pilosa](https://github.com/pilosa/pilosa/issues/1074). We learn from every discussion! ## Docs diff --git a/server/default.go b/server/default.go new file mode 100644 index 000000000..6e9726afe --- /dev/null +++ b/server/default.go @@ -0,0 +1,10 @@ +// +build !release +// +// This file sets defaults to be overridden by release.go + +package server + +import "time" + +// DefaultDiagnosticsInterval is the default sync frequency diagnostic metrics. A value of 0 disables diagnostics. +const DefaultDiagnosticsInterval = time.Duration(0) diff --git a/server/release.go b/server/release.go new file mode 100644 index 000000000..de5b4a4d0 --- /dev/null +++ b/server/release.go @@ -0,0 +1,10 @@ +// +build release +// +// This file sets release-specific variables. + +package server + +import "time" + +// DefaultDiagnosticsInterval is the default sync frequency diagnostic metrics. +const DefaultDiagnosticsInterval = 1 * time.Hour diff --git a/server/server.go b/server/server.go index 5b2b2010d..8379ef581 100644 --- a/server/server.go +++ b/server/server.go @@ -41,8 +41,8 @@ func init() { } const ( - // DefaultDiagnosticsInterval is the default sync frequency diagnostic metrics. - DefaultDiagnosticsInterval = 1 * time.Hour + // DefaultDataDir is the default data directory. + DefaultDataDir = "~/.pilosa" ) // Command represents the state of the pilosa server command. diff --git a/test/pilosa.go b/test/pilosa.go index 1278dc17a..cbe259040 100644 --- a/test/pilosa.go +++ b/test/pilosa.go @@ -124,8 +124,6 @@ func (m *Main) RunWithTransport(host string, bindPort int, joinSeed string, coor } // Open server listener. - // This is used to set Server.Name, which is used as the node - // name for identifying a memberlist node. err = m.Server.OpenListener() if err != nil { return seed, coord, err