Skip to content

Commit

Permalink
integrations: build with -trimpath option
Browse files Browse the repository at this point in the history
  • Loading branch information
zmb3 committed Aug 5, 2024
1 parent 7d8c220 commit 93cdbc7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integrations/access/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ VERSION ?= $(shell go run ../../hack/get-version/get-version.go)
BUILDDIR ?= build
BINARY = $(BUILDDIR)/teleport-$(ACCESS_PLUGIN)
ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags "-w -s"
BUILDFLAGS ?= $(ADDFLAGS) -trimpath -ldflags "-w -s"
CGOFLAG ?= CGO_ENABLED=0

OS ?= $(shell go env GOOS)
Expand Down
2 changes: 1 addition & 1 deletion integrations/event-handler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BINARY = $(BUILDDIR)/teleport-event-handler

GITREF ?= $(shell git describe --dirty --long --tags --match '*event-handler*')
ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags "-w -s -X main.Gitref=$(GITREF) -X main.Version=$(VERSION)"
BUILDFLAGS ?= $(ADDFLAGS) -trimpath -ldflags "-w -s -X main.Gitref=$(GITREF) -X main.Version=$(VERSION)"
CGOFLAG ?= CGO_ENABLED=0

PASS ?= 1234
Expand Down
2 changes: 1 addition & 1 deletion integrations/operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ crdgen-test: ## Run crdgen tests.

.PHONY: build
build: generate fmt vet ## Build manager binary.
go build -o bin/manager main.go namespace.go config.go
go build -trimpath -o bin/manager main.go namespace.go config.go

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
Expand Down
3 changes: 2 additions & 1 deletion integrations/terraform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ BUILDDIR ?= build
TFDIR ?= example

ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags '-w -s'
BUILDFLAGS ?= $(ADDFLAGS) -trimpath -ldflags '-w -s'
# CGO must NOT be enabled as hashicorp cloud does not support running providers using on CGO.
CGOFLAG ?= CGO_ENABLED=0

RELEASE = terraform-provider-teleport-v$(VERSION)-$(OS)-$(ARCH)-bin
Expand Down

0 comments on commit 93cdbc7

Please sign in to comment.