Skip to content

Commit c59ddf4

Browse files
authored
bump version to 1.7.0 and add bump csv script (#129)
1 parent f133f38 commit c59ddf4

File tree

5 files changed

+68
-14
lines changed

5 files changed

+68
-14
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ endif
6969
# Current Operator image name
7070
OPERATOR_IMAGE_NAME ?= ibm-namespace-scope-operator
7171
# Current Operator version
72-
OPERATOR_VERSION ?= 1.6.0
72+
OPERATOR_VERSION ?= 1.7.0
7373

7474
# Options for 'bundle-build'
7575
CHANNELS ?= beta

bundle-restricted/manifests/ibm-namespace-scope-operator-restricted.clusterserviceversion.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ metadata:
2323
]
2424
capabilities: Seamless Upgrades
2525
containerImage: quay.io/opencloudio/ibm-namespace-scope-operator:latest
26-
createdAt: "2020-11-2T15:38:33Z"
27-
olm.skipRange: '<1.6.0'
26+
createdAt: "2021-10-12T10:48:58Z"
27+
olm.skipRange: '<1.7.0'
2828
operators.operatorframework.io/builder: operator-sdk-v1.10.0+git
2929
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
3030
repository: https://github.com/IBM/ibm-namespace-scope-operator
3131
support: IBM
32-
name: ibm-namespace-scope-operator-restricted.v1.6.0
32+
name: ibm-namespace-scope-operator-restricted.v1.7.0
3333
namespace: placeholder
3434
spec:
3535
apiservicedefinitions: {}
@@ -157,7 +157,7 @@ spec:
157157
provider:
158158
name: IBM
159159
relatedImages:
160-
- image: quay.io/opencloudio/ibm-namespace-scope-operator:1.6.0
160+
- image: quay.io/opencloudio/ibm-namespace-scope-operator:1.7.0
161161
name: IBM_NAMESPACE_SCOPE_OPERATOR_IMAGE
162-
replaces: ibm-namespace-scope-operator-restricted.v1.5.0
163-
version: 1.6.0
162+
replaces: ibm-namespace-scope-operator-restricted.v1.6.0
163+
version: 1.7.0

bundle/manifests/ibm-namespace-scope-operator.clusterserviceversion.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ metadata:
2323
]
2424
capabilities: Seamless Upgrades
2525
containerImage: quay.io/opencloudio/ibm-namespace-scope-operator:latest
26-
createdAt: "2020-11-2T15:38:33Z"
27-
olm.skipRange: '<1.6.0'
26+
createdAt: "2021-10-12T10:48:58Z"
27+
olm.skipRange: '<1.7.0'
2828
operators.operatorframework.io/builder: operator-sdk-v1.10.0+git
2929
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
3030
repository: https://github.com/IBM/ibm-namespace-scope-operator
3131
support: IBM
32-
name: ibm-namespace-scope-operator.v1.6.0
32+
name: ibm-namespace-scope-operator.v1.7.0
3333
namespace: placeholder
3434
spec:
3535
apiservicedefinitions: {}
@@ -157,7 +157,7 @@ spec:
157157
provider:
158158
name: IBM
159159
relatedImages:
160-
- image: quay.io/opencloudio/ibm-namespace-scope-operator:1.6.0
160+
- image: quay.io/opencloudio/ibm-namespace-scope-operator:1.7.0
161161
name: IBM_NAMESPACE_SCOPE_OPERATOR_IMAGE
162-
replaces: ibm-namespace-scope-operator.v1.5.0
163-
version: 1.6.0
162+
replaces: ibm-namespace-scope-operator.v1.6.0
163+
version: 1.7.0

common/scripts/next-csv.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Copyright 2021 IBM Corporation
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
# This script needs to inputs
20+
# The CSV version that is currently in dev
21+
22+
CURRENT_DEV_CSV=$1
23+
NEW_DEV_CSV=$2
24+
PREVIOUS_DEV_CSV=$3
25+
26+
if [ -z "$NEW_DEV_CSV" ]; then
27+
let NEW_DEV_CSV_Z=$(echo $CURRENT_DEV_CSV | cut -d '.' -f3)+1
28+
NEW_DEV_CSV=$(echo $CURRENT_DEV_CSV | gsed "s/\.[0-9][0-9]*$/\.$NEW_DEV_CSV_Z/")
29+
fi
30+
if [ -z "$PREVIOUS_DEV_CSV" ]; then
31+
let PREVIOUS_DEV_CSV_Z=$(echo $CURRENT_DEV_CSV | cut -d '.' -f3)-1
32+
PREVIOUS_DEV_CSV=$(echo $CURRENT_DEV_CSV | gsed "s/\.[0-9][0-9]*$/\.$PREVIOUS_DEV_CSV_Z/")
33+
fi
34+
35+
CSV_PATH=bundle/manifests
36+
RESTRICTED_CSV_PATH=bundle-restricted/manifests
37+
38+
# Update New CSV
39+
# replace old CSV value with new one
40+
sed -i "s/$CURRENT_DEV_CSV/$NEW_DEV_CSV/g" $CSV_PATH/ibm-namespace-scope-operator.clusterserviceversion.yaml
41+
sed -i "s/$CURRENT_DEV_CSV/$NEW_DEV_CSV/g" $RESTRICTED_CSV_PATH/ibm-namespace-scope-operator-restricted.clusterserviceversion.yaml
42+
TIME_STAMP="$(date '+%Y-%m-%dT%H:%M:%S'Z)"
43+
sed -i "s/2[0-9]*-[0-9]*-[0-9]*T[0-9]*:[0-9]*:[0-9]*Z/$TIME_STAMP/g" $CSV_PATH/ibm-namespace-scope-operator.clusterserviceversion.yaml
44+
sed -i "s/2[0-9]*-[0-9]*-[0-9]*T[0-9]*:[0-9]*:[0-9]*Z/$TIME_STAMP/g" $RESTRICTED_CSV_PATH/ibm-namespace-scope-operator-restricted.clusterserviceversion.yaml
45+
46+
echo "Updated New file with new CSV version"
47+
sed -i "s/$PREVIOUS_DEV_CSV/$CURRENT_DEV_CSV/g" $CSV_PATH/ibm-namespace-scope-operator.clusterserviceversion.yaml
48+
sed -i "s/$PREVIOUS_DEV_CSV/$CURRENT_DEV_CSV/g" $RESTRICTED_CSV_PATH/ibm-namespace-scope-operator-restricted.clusterserviceversion.yaml
49+
echo "Updated the replaces version line"
50+
51+
#Update version.go to new dev version
52+
sed -i "s/$CURRENT_DEV_CSV/$NEW_DEV_CSV/" version/version.go
53+
sed -i "s/$CURRENT_DEV_CSV/$NEW_DEV_CSV/" Makefile
54+
echo "Updated the version.go with new version"

version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
package version
1818

1919
var (
20-
Version = "1.6.0"
20+
Version = "1.7.0"
2121
)

0 commit comments

Comments
 (0)