Files
teleport/version.mk
T
Edoardo Spadolini 19cb4f5515 Add chart for the Relay service (#59454)
* Chart yaml, values and helpers

* address comments

* autogenerated reference docs

* add missing extra labels and annotations for the service

* admonition formatting

* version and image helpers

* join secret name helper

* resources

* update reference

* add linting

* Add helm unittests

* Allow custom key for the trusted CA bundle secret

* Remove check for negative replicaCount value

* Clean up .lint/full.yaml and fill it in a bit more

* Fix selector labels indentation in PDB

* Redo tests avoiding snapshots

* Update exercise-configmap to render the whole chart for linting
2025-10-02 16:17:46 +00:00

41 lines
2.2 KiB
Makefile

GITREF=$(shell git describe --long --tags)
# $(GITREF_GO) will be written to gitref.go
GITREF_GO="// Code generated by \"make version\". DO NOT EDIT.\n\n\
package teleport\n\n\
func init() { Gitref = \"$(GITREF)\" }\n"
#
# setver updates api/version.go and gitref.go with VERSION and GITREF vars
#
.PHONY: setver
setver: validate-semver helm-version tsh-version
GOWORK=off CGO_ENABLED=0 go -C build.assets/tooling run ./cmd/apiversion "$(VERSION)" > api/version.go
@printf $(GITREF_GO) | gofmt > gitref.go
# helm-version automatically updates the versions of Helm charts to match the version set in the Makefile,
# so that chart versions are also kept in sync when the Teleport version is updated for a release.
# If the version contains '-dev' (as it does on the master branch, or for development builds) then we get the latest
# published major version number by parsing a sorted list of git tags instead, to make deploying the chart from master
# work as expected. Version numbers are quoted as a string because Helm otherwise treats dotted decimals as floats.
# The weird -i usage is to make the sed commands work the same on both Linux and Mac. Test on both platforms if you change it.
.PHONY:helm-version
helm-version:
for CHART in teleport-cluster tbot teleport-kube-agent teleport-cluster/charts/teleport-operator teleport-relay event-handler access/discord access/email access/jira access/mattermost access/msteams access/pagerduty access/slack access/datadog; do \
sed -i'.bak' -e "s_^\\.version:\ .*_.version: \\&version \"$${VERSION}\"_g" examples/chart/$${CHART}/Chart.yaml || exit 1; \
rm -f examples/chart/$${CHART}/Chart.yaml.bak; \
done
TSH_APP_PLISTS := $(wildcard build.assets/macos/*/tsh.app/Contents/Info.plist)
PLIST_FILES := $(abspath $(TSH_APP_PLISTS))
# tsh-version sets CFBundleVersion and CFBundleShortVersionString in the tsh{,dev} Info.plist
.PHONY:tsh-version
tsh-version:
GOWORK=off CGO_ENABLED=0 go -C build.assets/tooling run ./cmd/update-plist-version $(VERSION) $(PLIST_FILES)
.PHONY:validate-semver
validate-semver:
# Turning off GOWORK to prevent missing package errors.
GOWORK=off CGO_ENABLED=0 go -C build.assets/tooling run ./cmd/check -check valid -tag v$(VERSION)