@@ -115,8 +115,8 @@ clean:
115
115
@rm -rf ./bin
116
116
117
117
.PHONY : e2e
118
- e2e :
119
- $(GO ) run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --progress --trace --randomize-suites --race $(if $(TEST ) ,-focus '$(TEST ) ') $(TAGS ) ./test/e2e -- $(if $(SKIPTLS ) ,-skip-tls-verify true) $(if $(USEHTTP ) ,-use-http true)
118
+ e2e : ginkgo
119
+ $(GINKGO ) --v --randomize-all --progress --trace --randomize-suites --race $(if $(TEST ) ,-focus '$(TEST ) ') $(TAGS ) ./test/e2e -- $(if $(SKIPTLS ) ,-skip-tls-verify true) $(if $(USEHTTP ) ,-use-http true)
120
120
121
121
.PHONY : release
122
122
export OPM_IMAGE_REPO ?= quay.io/operator-framework/opm
@@ -137,8 +137,8 @@ export LATEST_IMAGE_OR_EMPTY ?= $(shell \
137
137
&& [ "$(shell echo -e "$(OPM_VERSION ) \n$(LATEST_TAG ) " | sort -rV | head -n1) " == "$(OPM_VERSION ) " ] \
138
138
&& echo "$(OPM_IMAGE_REPO ) :latest" || echo "")
139
139
release : RELEASE_ARGS ?= release --rm-dist --snapshot -f release/goreleaser.$(shell go env GOOS) .yaml
140
- release :
141
- ./scripts/fetch goreleaser 1.4.1 && ./bin/goreleaser $(RELEASE_ARGS )
140
+ release : goreleaser
141
+ $( GORELEASER ) $(RELEASE_ARGS )
142
142
143
143
# tagged-or-empty returns $(OPM_IMAGE_REPO):$(1) when HEAD is assigned a non-prerelease semver tag,
144
144
# otherwise the empty string. An empty string causes goreleaser to skip building
@@ -150,3 +150,32 @@ $(shell \
150
150
&& git describe --tags --exact-match HEAD >/dev/null 2>&1 \
151
151
&& echo "$(OPM_IMAGE_REPO ) :$(1 ) " || echo "" )
152
152
endef
153
+
154
+ # ###############
155
+ # Hack / Tools #
156
+ # ###############
157
+
158
+ GO_INSTALL_OPTS ?= "-mod=mod"
159
+
160
+ # # Location to install dependencies to
161
+ LOCALBIN ?= $(shell pwd) /bin
162
+ $(LOCALBIN ) :
163
+ mkdir -p $(LOCALBIN )
164
+
165
+ # # Tool Binaries
166
+ GORELEASER ?= $(LOCALBIN ) /goreleaser
167
+ GINKGO ?= $(LOCALBIN ) /ginkgo
168
+
169
+ # # Tool Versions
170
+ GORELEASER_VERSION ?= v1.8.3
171
+ GINKGO_VERSION ?= v2.1.3
172
+
173
+ .PHONY : goreleaser
174
+ goreleaser : $(GORELEASER ) # # Download goreleaser locally if necessary.
175
+ $(GORELEASER ) : $(LOCALBIN )
176
+ GOBIN=$(LOCALBIN ) go install $(GO_INSTALL_OPTS ) github.com/goreleaser/goreleaser@$(GORELEASER_VERSION )
177
+
178
+ .PHONY : ginkgo
179
+ ginkgo : $(GINKGO ) # # Download ginkgo locally if necessary.
180
+ $(GINKGO ) : $(LOCALBIN )
181
+ GOBIN=$(LOCALBIN ) go install $(GO_INSTALL_OPTS ) github.com/onsi/ginkgo/v2/ginkgo@$(GINKGO_VERSION )
0 commit comments