Skip to content

Commit 9ac36c5

Browse files
committed
Adding bundle.Dockerfile changes
1 parent 4be75ca commit 9ac36c5

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

bundle.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ COPY bundle/tests/scorecard /tests/scorecard/
2424
LABEL com.redhat.component="Multiarch Tuning Operator"
2525
LABEL distribution-scope="public"
2626
LABEL name="multiarch-tuning/multiarch-tuning-operator-bundle"
27-
LABEL release="1.2.0"
28-
LABEL version="1.2.0"
27+
LABEL release="1.2.1"
28+
LABEL version="1.2.1"
2929
LABEL cpe="cpe:/a:redhat:multiarch_tuning_operator:1.1::el9"
3030
LABEL url="https://github.com/openshift/multiarch-tuning-operator"
3131
LABEL vendor="Red Hat, Inc."

hack/bump-version.sh

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,23 @@ echo "Bumping version to: $VERSION"
1717
yq -i ".spec.version=\"${VERSION}\"" config/manifests/bases/multiarch-tuning-operator.clusterserviceversion.yaml
1818
yq -i ".metadata.name=\"multiarch-tuning-operator.v${VERSION}\"" config/manifests/bases/multiarch-tuning-operator.clusterserviceversion.yaml
1919
yq -i ".spec.startingCSV=\"multiarch-tuning-operator.v${VERSION}\"" deploy/base/operators.coreos.com/subscriptions/openshift-multiarch-tuning-operator/subscription.yaml
20-
yq -i ".entries[0].name=\"multiarch-tuning-operator.v${VERSION}\"" index.base.yaml
21-
sed -i "s/^LABEL release=.*/LABEL release=\"${VERSION}\"/" Dockerfile
22-
sed -i "s/^LABEL version=.*/LABEL version=\"${VERSION}\"/" Dockerfile
23-
sed -i "s/^LABEL release=.*/LABEL release=\"${VERSION}\"/" konflux.Dockerfile
24-
sed -i "s/^LABEL version=.*/LABEL version=\"${VERSION}\"/" konflux.Dockerfile
25-
sed -i "s/^VERSION ?= .*/VERSION ?= ${VERSION}/" Makefile
20+
yq eval-all -i "(select(.schema==\"olm.channel\").entries[0].name)=\"multiarch-tuning-operator.v${VERSION}\"" index.base.yaml
21+
22+
23+
if [[ "$(uname)" == "Darwin" ]]; then
24+
# macOS BSD sed
25+
sed -i '' "s/^LABEL release=.*/LABEL release=\"${VERSION}\"/" Dockerfile
26+
sed -i '' "s/^LABEL version=.*/LABEL version=\"${VERSION}\"/" Dockerfile
27+
sed -i '' "s/^LABEL release=.*/LABEL release=\"${VERSION}\"/" konflux.Dockerfile
28+
sed -i '' "s/^LABEL version=.*/LABEL version=\"${VERSION}\"/" konflux.Dockerfile
29+
sed -i '' "s/^VERSION ?= .*/VERSION ?= ${VERSION}/" Makefile
30+
else
31+
# Linux GNU sed
32+
sed -i "s/^LABEL release=.*/LABEL release=\"${VERSION}\"/" Dockerfile
33+
sed -i "s/^LABEL version=.*/LABEL version=\"${VERSION}\"/" Dockerfile
34+
sed -i "s/^LABEL release=.*/LABEL release=\"${VERSION}\"/" konflux.Dockerfile
35+
sed -i "s/^LABEL version=.*/LABEL version=\"${VERSION}\"/" konflux.Dockerfile
36+
sed -i "s/^VERSION ?= .*/VERSION ?= ${VERSION}/" Makefile
37+
fi
38+
echo "make bundle"
2639
make bundle

hack/patch-bundle-dockerfile.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ LABEL io.k8s.display-name="Multiarch Tuning Operator"
2424
LABEL io.openshift.tags="openshift,operator,multiarch,scheduling"'
2525

2626
# Remove the content of the bundle.konflux.Dockerfile starting from the line with the comment "# Labels from hack/patch-bundle-dockerfile.sh"
27-
sed -i '/# Labels from hack\/patch-bundle-dockerfile.sh/,$d' bundle.konflux.Dockerfile
27+
if [[ "$(uname)" == "Darwin" ]]; then
28+
# macOS BSD sed
29+
sed -i '' '/# Labels from hack\/patch-bundle-dockerfile.sh/,$d' bundle.konflux.Dockerfile
30+
else
31+
# Linux GNU sed
32+
sed -i '/# Labels from hack\/patch-bundle-dockerfile.sh/,$d' bundle.konflux.Dockerfile
33+
fi
2834
# Append the content to the bundle.Dockerfile and bundle.konflux.Dockerfile
2935
cat <<EOF >>bundle.Dockerfile
3036

0 commit comments

Comments
 (0)