Skip to content

Commit

Permalink
[teleport-update] Add Makefile build target (#48531)
Browse files Browse the repository at this point in the history
* Add build target for teleport-update

* Set CGO_ENABLED=0 for building teleport-update
  • Loading branch information
vapopov authored Nov 6, 2024
1 parent eb47d5f commit 53cc181
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ $(BUILDDIR)/tbot: BUILDFLAGS_TBOT += $(if $(TBOT_CGO_FLAGS), -buildmode=pie)
$(BUILDDIR)/tbot:
GOOS=$(OS) GOARCH=$(ARCH) $(TBOT_CGO_FLAGS) go build -tags "$(FIPS_TAG) $(KUSTOMIZE_NO_DYNAMIC_PLUGIN)" -o $(BUILDDIR)/tbot $(BUILDFLAGS_TBOT) ./tool/tbot

.PHONY: $(BUILDDIR)/teleport-update
$(BUILDDIR)/teleport-update:
GOOS=$(OS) GOARCH=$(ARCH) CGO_ENABLED=0 go build -o $(BUILDDIR)/teleport-update $(BUILDFLAGS) ./tool/teleport-update

TELEPORT_ARGS ?= start
.PHONY: teleport-hot-reload
teleport-hot-reload:
Expand Down Expand Up @@ -1620,10 +1624,11 @@ print/env:
.PHONY: install
install: build
@echo "\n** Make sure to run 'make install' as root! **\n"
cp -f $(BUILDDIR)/tctl $(BINDIR)/
cp -f $(BUILDDIR)/tsh $(BINDIR)/
cp -f $(BUILDDIR)/tbot $(BINDIR)/
cp -f $(BUILDDIR)/teleport $(BINDIR)/
cp -f $(BUILDDIR)/tctl $(BINDIR)/
cp -f $(BUILDDIR)/tsh $(BINDIR)/
cp -f $(BUILDDIR)/tbot $(BINDIR)/
cp -f $(BUILDDIR)/teleport $(BINDIR)/
cp -f $(BUILDDIR)/teleport-update $(BINDIR)/
mkdir -p $(DATADIR)

# Docker image build. Always build the binaries themselves within docker (see
Expand Down Expand Up @@ -1813,7 +1818,7 @@ changelog:
# does not match version set it will fail to create a release. If tag doesn't exist it
# will also fail to create a release.
#
# For more information on release notes generation see:
# For more information on release notes generation see:
# https://github.com/gravitational/shared-workflows/tree/gus/release-notes/tools/release-notes#readme
RELEASE_NOTES_GEN = github.com/gravitational/shared-workflows/tools/release-notes@latest
.PHONY: create-github-release
Expand Down

0 comments on commit 53cc181

Please sign in to comment.