Skip to content

Commit 0cdf75b

Browse files
committed
Upgrades operator-sdk to v1.41.1. We are now downloading the built operator-sdk binaries from GitHub instead of building it using Go. Building using Go was causing all kinds of issues (replace statements, library dependencies ...).
This commit also adds the darwin targets for the preflight tool, fixing a TODO comment. Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
1 parent e869982 commit 0cdf75b

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

modules/tools/00_mod.mk

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ tools += cmrel=e3cbe5171488deda000145003e22567bdce622ea
137137
tools += golangci-lint=v2.2.1
138138
# https://pkg.go.dev/golang.org/x/vuln?tab=versions
139139
tools += govulncheck=v1.1.4
140-
# https://pkg.go.dev/github.com/operator-framework/operator-sdk/cmd/operator-sdk?tab=versions
141-
tools += operator-sdk=v1.40.0
140+
# https://github.com/operator-framework/operator-sdk/releases
141+
tools += operator-sdk=v1.41.1
142142
# https://pkg.go.dev/github.com/cli/cli/v2?tab=versions
143143
tools += gh=v2.74.2
144144
# https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases
@@ -354,7 +354,6 @@ go_dependencies += cmctl=github.com/cert-manager/cmctl/v2
354354
go_dependencies += cmrel=github.com/cert-manager/release/cmd/cmrel
355355
go_dependencies += golangci-lint=github.com/golangci/golangci-lint/v2/cmd/golangci-lint
356356
go_dependencies += govulncheck=golang.org/x/vuln/cmd/govulncheck
357-
go_dependencies += operator-sdk=github.com/operator-framework/operator-sdk/cmd/operator-sdk
358357
go_dependencies += gh=github.com/cli/cli/v2/cmd/gh
359358
go_dependencies += gci=github.com/daixiang0/gci
360359
go_dependencies += yamlfmt=github.com/google/yamlfmt/cmd/yamlfmt
@@ -615,25 +614,26 @@ $(DOWNLOAD_DIR)/tools/istioctl@$(ISTIOCTL_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(
615614

616615
preflight_linux_amd64_SHA256SUM=69f8b249538adf0edcfcfcc82eea5d5aae44e4d2171ced581cd75a220624d25e
617616
preflight_linux_arm64_SHA256SUM=d71bea7bc540d93268e361d8480b9c370a715ffc69db5dadd44bd90fd461d9ee
617+
preflight_darwin_amd64_SHA256SUM=7a47d614fe5cfaf7181005a7eda38ed9c1aca89145bf41fbcd067e9377ef03d7
618+
preflight_darwin_arm64_SHA256SUM=d662d466491bef31b973e73779cbd387cc848610e9b945667c38ee3e93ca2fdc
618619

619-
# Currently there are no official releases for darwin, you cannot submit results
620-
# on non-official binaries, but we can still run tests.
621-
#
622-
# Once https://github.com/redhat-openshift-ecosystem/openshift-preflight/pull/942 is merged
623-
# we can remove this darwin specific hack
624-
.PRECIOUS: $(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_darwin_$(HOST_ARCH)
625-
$(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_darwin_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools
620+
.PRECIOUS: $(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_$(HOST_OS)_$(HOST_ARCH)
621+
$(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools
626622
@source $(lock_script) $@; \
627-
mkdir -p $(outfile).dir; \
628-
GOWORK=off GOBIN=$(outfile).dir $(GO) install github.com/redhat-openshift-ecosystem/openshift-preflight/cmd/preflight@$(PREFLIGHT_VERSION); \
629-
mv $(outfile).dir/preflight $(outfile); \
630-
rm -rf $(outfile).dir
623+
$(CURL) https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/$(PREFLIGHT_VERSION)/preflight-$(HOST_OS)-$(HOST_ARCH) -o $(outfile); \
624+
$(checkhash_script) $(outfile) $(preflight_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM); \
625+
chmod +x $(outfile)
626+
627+
operator-sdk_linux_amd64_SHA256SUM=348284cbd5298f70e2b0a01f9f86820a3149aa6e7e19272e886a9d5769c7fb69
628+
operator-sdk_linux_arm64_SHA256SUM=719e5565cb11895995284d236e94bc14af0c9e7c96954ce4f30f450d8c86995e
629+
operator-sdk_darwin_amd64_SHA256SUM=d1d55418a37f142913b7155cfdd16416aeaa657eb25e27644bd37a91451f7751
630+
operator-sdk_darwin_arm64_SHA256SUM=e9f3bdc229697a30f725ffa5bbb15ee59ca7eba6e6f58b3028bf940903ed0df6
631631

632-
.PRECIOUS: $(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_linux_$(HOST_ARCH)
633-
$(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_linux_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools
632+
.PRECIOUS: $(DOWNLOAD_DIR)/tools/operator-sdk@$(OPERATOR-SDK_VERSION)_$(HOST_OS)_$(HOST_ARCH)
633+
$(DOWNLOAD_DIR)/tools/operator-sdk@$(OPERATOR-SDK_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools
634634
@source $(lock_script) $@; \
635-
$(CURL) https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/$(PREFLIGHT_VERSION)/preflight-linux-$(HOST_ARCH) -o $(outfile); \
636-
$(checkhash_script) $(outfile) $(preflight_linux_$(HOST_ARCH)_SHA256SUM); \
635+
$(CURL) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR-SDK_VERSION)/operator-sdk_$(HOST_OS)_$(HOST_ARCH) -o $(outfile); \
636+
$(checkhash_script) $(outfile) $(operator-sdk_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM); \
637637
chmod +x $(outfile)
638638

639639
#################

0 commit comments

Comments
 (0)