@@ -155,18 +155,31 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
155
155
CONTROLLER_GEN ?= $(LOCALBIN ) /controller-gen
156
156
ENVTEST ?= $(LOCALBIN ) /setup-envtest
157
157
OPERATOR_SDK ?= $(LOCALBIN ) /operator-sdk
158
+ GH_CLI ?= $(LOCALBIN ) /gh
158
159
159
160
# # Tool Versions
160
161
KUSTOMIZE_VERSION ?= v3.8.7
161
162
CONTROLLER_TOOLS_VERSION ?= v0.9.2
162
163
OPERATOR_SDK_VERSION ?= v1.27.0
164
+ GH_CLI_VERSION ?= 2.30.0
163
165
164
166
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
165
167
.PHONY : kustomize
166
168
kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
167
169
$(KUSTOMIZE ) : $(LOCALBIN )
168
170
test -s $(LOCALBIN ) /kustomize || { curl -s $( KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $( subst v,,$( KUSTOMIZE_VERSION) ) $( LOCALBIN) ; }
169
171
172
+ GH_CLI_DL_URL := https://github.com/cli/cli/releases/download/v$(GH_CLI_VERSION )
173
+ GH_CLI_DL_FILENAME := gh_$(GH_CLI_VERSION ) _$(shell go env GOOS) _$(shell go env GOARCH)
174
+ .PHONY : install-gh-cli
175
+ install-gh-cli : $(GH_CLI )
176
+ $(GH_CLI ) : $(LOCALBIN )
177
+ curl -L $(GH_CLI_DL_URL ) /$(GH_CLI_DL_FILENAME ) .tar.gz --output $(GH_CLI_DL_FILENAME ) .tar.gz
178
+ tar -xvzf $(GH_CLI_DL_FILENAME ) .tar.gz
179
+ cp $(GH_CLI_DL_FILENAME ) /bin/gh $(GH_CLI )
180
+ rm -rf $(GH_CLI_DL_FILENAME )
181
+ rm -rf $(GH_CLI_DL_FILENAME ) .tar.gz
182
+
170
183
.PHONY : controller-gen
171
184
controller-gen : $(CONTROLLER_GEN ) # # Download controller-gen locally if necessary.
172
185
$(CONTROLLER_GEN ) : $(LOCALBIN )
@@ -204,6 +217,16 @@ bundle-build: ## Build the bundle image.
204
217
bundle-push : # # Push the bundle image.
205
218
$(MAKE ) image-push IMG=$(BUNDLE_IMG )
206
219
220
+ .PHONY : openshift-community-operator-releases
221
+ openshift-community-operator-release : install-gh-cli bundle # # build bundle and create PR in openshift communityh
222
+ gh repo clone
[email protected] :project-codeflare/community-operators-prod.git
223
+ cd community-operators-prod && git pull upstream main && git push origin main
224
+ cp -r bundle community-operators-prod/operators/codeflare-operator/$(VERSION )
225
+ cd community-operators-prod && git checkout -b codeflare-release-$(VERSION ) && git add operators/codeflare-operator/$(VERSION ) /* && git commit -m " add bundle manifests codeflare version $( VERSION) " && git push origin codeflare-release-$(VERSION )
226
+ gh pr create --repo redhat-openshift-ecosystem/community-operators-prod --title " CodeFlare $( VERSION) " --body " New release of codeflare operator" --head project-codeflare:codeflare-release-$(VERSION ) --base main
227
+ rm -rf community-operators-prod
228
+
229
+
207
230
.PHONY : opm
208
231
OPM = ./bin/opm
209
232
opm : # # Download opm locally if necessary.
0 commit comments