From 1a3cdd15914ddbe1fb194525b3a2fbb4a521975b Mon Sep 17 00:00:00 2001 From: "ryan-distrust.co" Date: Thu, 11 May 2023 21:25:59 -0400 Subject: [PATCH] Makefile: add talosctl --- Makefile | 16 ++++++++++++++++ config/global.env | 3 +++ 2 files changed, 19 insertions(+) diff --git a/Makefile b/Makefile index c95e49b..3a3819f 100644 --- a/Makefile +++ b/Makefile @@ -113,6 +113,9 @@ $(FETCH_DIR)/terraform: $(FETCH_DIR)/sops: $(call git_clone,$@,$(SOPS_REPO),$(SOPS_REF)) +$(FETCH_DIR)/talosctl: + $(call git_clone,$@,$(TALOSCTL_REPO),$(TALOSCTL_REF)) + $(OUT_DIR)/terraform: $(FETCH_DIR)/terraform $(call toolchain," \ cd $(FETCH_DIR)/terraform && \ @@ -139,3 +142,16 @@ $(OUT_DIR)/sops: $(FETCH_DIR)/sops -ldflags='-w -extldflags=-static' \ -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) \ + ") diff --git a/config/global.env b/config/global.env index 259a62a..5e45d82 100644 --- a/config/global.env +++ b/config/global.env @@ -4,3 +4,6 @@ TERRAFORM_REPO=https://github.com/hashicorp/terraform SOPS_REF=86f500de6102f5219e3fd0a25c718db01a7d39ed SOPS_REPO=https://github.com/mozilla/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