Separate the featurebase and fbsql make build targets (#2272)

* Separate the featurebase and fbsql make build targets

Using the same build target was problematic because they shared the same
flags. Since the `-o` output flag was used, the fbsql binary was
overwriting the featurebase binary.

* make sure the make package target builds fbsql
This commit is contained in:
Travis Turner 2023-02-22 15:33:11 -06:00 committed by GitHub
parent d1dbcabb3d
commit a633b72f3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -161,6 +161,10 @@ build featurebase:
- GOOS="linux" GOARCH="arm64" make build FLAGS="-o featurebase_linux_arm64"
- GOOS="darwin" GOARCH="amd64" make build FLAGS="-o featurebase_darwin_amd64"
- GOOS="darwin" GOARCH="arm64" make build FLAGS="-o featurebase_darwin_arm64"
- GOOS="linux" GOARCH="amd64" make build-fbsql FLAGS="-o fbsql_linux_amd64"
- GOOS="linux" GOARCH="arm64" make build-fbsql FLAGS="-o fbsql_linux_arm64"
- GOOS="darwin" GOARCH="amd64" make build-fbsql FLAGS="-o fbsql_darwin_amd64"
- GOOS="darwin" GOARCH="arm64" make build-fbsql FLAGS="-o fbsql_darwin_arm64"
artifacts:
paths:
- featurebase_linux_amd64

View file

@ -116,14 +116,18 @@ cover:
cover-viz: cover
$(GO) tool cover -html=build/coverage.out
# Compile Pilosa
# Build featurebase
build:
$(GO) build -tags='$(BUILD_TAGS)' -ldflags $(LDFLAGS) $(FLAGS) ./cmd/featurebase
# Build fbsql
build-fbsql:
$(GO) build -tags='$(BUILD_TAGS)' -ldflags $(LDFLAGS) $(FLAGS) ./cmd/fbsql
package:
GOOS=$(GOOS) GOARCH=$(GOARCH) $(MAKE) build
GOOS=$(GOOS) GOARCH=$(GOARCH) $(MAKE) build-fbsql
GOARCH=$(GOARCH) VERSION=$(VERSION) nfpm package --packager deb --target featurebase.$(VERSION).$(GOARCH).deb
GOARCH=$(GOARCH) VERSION=$(VERSION) nfpm package --packager rpm --target featurebase.$(VERSION).$(GOARCH).rpm