Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,20 @@ endif

.PHONY: update-version-numbers
update-version-numbers: check-operator-version ## Set skip range and version numbers in manifests.
@CURRENT_VERSION=$$(grep '^VERSION?=' version.Makefile | cut -d= -f2); \
if [ "$(VERSION)" != "$$CURRENT_VERSION" ]; then \
sed -i "s/^ARG CO_OLD_VERSION=.*/ARG CO_OLD_VERSION=\"$$CURRENT_VERSION\"/" bundle.openshift.Dockerfile; \
sed -i 's/^ARG CO_NEW_VERSION=.*/ARG CO_NEW_VERSION="$(VERSION)"/' bundle.openshift.Dockerfile; \
sed -i "s/^PREVIOUS_VERSION?=.*/PREVIOUS_VERSION?=$$CURRENT_VERSION/" version.Makefile; \
fi
sed -i 's/^VERSION?=.*/VERSION?=$(VERSION)/' version.Makefile
sed -i 's/Version = ".*"/Version = "$(VERSION)"/' version/version.go
sed -i 's/version=.*/version=$(VERSION)/' images/operator/Dockerfile
sed -i 's/version=.*/version=$(VERSION)/' images/openscap/Containerfile
sed -i 's/version=.*/version=$(VERSION)/' images/must-gather/Containerfile
sed -i "s/\(^ version: \).*/\1$(VERSION)/" config/manifests/bases/compliance-operator.clusterserviceversion.yaml
sed -i "s/\(^ replaces: compliance-operator.v\).*/\1$(PREVIOUS_VERSION)/" config/manifests/bases/compliance-operator.clusterserviceversion.yaml
@PREV=$$(grep '^PREVIOUS_VERSION?=' version.Makefile | cut -d= -f2); \
sed -i "s/\(^ replaces: compliance-operator.v\).*/\1$$PREV/" config/manifests/bases/compliance-operator.clusterserviceversion.yaml
sed -i "s/\(olm.skipRange: '>=.*\)<.*'/\1<$(VERSION)'/" config/manifests/bases/compliance-operator.clusterserviceversion.yaml
sed -i "s/\(\"name\": \"compliance-operator.v\).*\"/\1$(VERSION)\"/" catalog/preamble.json
sed -i "s/\(\"skipRange\": \">=.*\)<.*\"/\1<$(VERSION)\"/" catalog/preamble.json
Expand Down
Loading