Makefile: add talosctl

This commit is contained in:
ryan-distrust.co 2023-05-11 21:25:59 -04:00
parent fc0a7757e3
commit 1a3cdd1591
Signed by untrusted user who does not match committer: ryan
GPG Key ID: 8E401478A3FBEF72
2 changed files with 19 additions and 0 deletions

View File

@ -113,6 +113,9 @@ $(FETCH_DIR)/terraform:
$(FETCH_DIR)/sops: $(FETCH_DIR)/sops:
$(call git_clone,$@,$(SOPS_REPO),$(SOPS_REF)) $(call git_clone,$@,$(SOPS_REPO),$(SOPS_REF))
$(FETCH_DIR)/talosctl:
$(call git_clone,$@,$(TALOSCTL_REPO),$(TALOSCTL_REF))
$(OUT_DIR)/terraform: $(FETCH_DIR)/terraform $(OUT_DIR)/terraform: $(FETCH_DIR)/terraform
$(call toolchain," \ $(call toolchain," \
cd $(FETCH_DIR)/terraform && \ cd $(FETCH_DIR)/terraform && \
@ -139,3 +142,16 @@ $(OUT_DIR)/sops: $(FETCH_DIR)/sops
-ldflags='-w -extldflags=-static' \ -ldflags='-w -extldflags=-static' \
-o /home/build/$@ $(SOPS_PKG) \ -o /home/build/$@ $(SOPS_PKG) \
") ")
$(OUT_DIR)/talosctl: $(FETCH_DIR)/talosctl
$(call toolchain," \
cd $(FETCH_DIR)/talosctl && \
export CGO_ENABLED=0 && \
export GOCACHE=/home/build/$(CACHE_DIR) && \
export GOPATH=/home/build/$(CACHE_DIR) && \
go build \
-v \
-trimpath \
-ldflags='-w -extldflags=-static' \
-o /home/build/$@ $(TALOSCTL_PKG) \
")

View File

@ -4,3 +4,6 @@ TERRAFORM_REPO=https://github.com/hashicorp/terraform
SOPS_REF=86f500de6102f5219e3fd0a25c718db01a7d39ed SOPS_REF=86f500de6102f5219e3fd0a25c718db01a7d39ed
SOPS_REPO=https://github.com/mozilla/sops SOPS_REPO=https://github.com/mozilla/sops
SOPS_PKG=go.mozilla.org/sops/v3/cmd/sops SOPS_PKG=go.mozilla.org/sops/v3/cmd/sops
TALOSCTL_REF=a2cc92b8a54e42fc2554d49e4e2147a57fba69cb
TALOSCTL_REPO=https://github.com/siderolabs/talos
TALOSCTL_PKG=github.com/siderolabs/talos/cmd/talosctl