Skip to content

Commit

Permalink
Ensure csv auto update does not change the patch permanently (#317)
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Yong <jason_yong@uk.ibm.com>
  • Loading branch information
yongja79 committed Jan 24, 2022
1 parent 73885be commit 279cdb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ undeploy: manifests kustomize
# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
sed -i.bak "s,IMAGE,${IMG},g;s,CREATEDAT,${CREATEDAT},g" config/manifests/patches/csvAnnotations.yaml
rm -f config/manifests/patches/csvAnnotations.yaml.bak
# Run go fmt against code
fmt:
Expand Down Expand Up @@ -145,9 +144,11 @@ endif
# Generate bundle manifests and metadata, then validate generated files.
.PHONY: bundle
bundle: manifests setup
sed -i.bak "s,IMAGE,${IMG},g;s,CREATEDAT,${CREATEDAT},g" config/manifests/patches/csvAnnotations.yaml
operator-sdk generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
mv config/manifests/patches/csvAnnotations.yaml.bak config/manifests/patches/csvAnnotations.yaml
operator-sdk bundle validate ./bundle

# Build the bundle image.
Expand Down

0 comments on commit 279cdb0

Please sign in to comment.