Skip to content

Commit 6fcaa79

Browse files
committed
CMP-3381: Bump version to 1.3.6
1 parent fc4c2c7 commit 6fcaa79

File tree

6 files changed

+24
-22
lines changed

6 files changed

+24
-22
lines changed

bundle-hack/update_csv.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,24 @@ func addRequiredAnnotations(csv map[string]interface{}){
8585
fmt.Println("Added required annotations")
8686
}
8787

88-
func replaceVersion(version string, csv map[string]interface{}) {
88+
func replaceVersion(oldVersion, newVersion string, csv map[string]interface{}) {
8989
spec, ok := csv["spec"].(map[string]interface{})
9090
metadata, ok := csv["metadata"].(map[string]interface{})
9191
if !ok {
9292
log.Fatal("Error: 'spec' does not exist in the CSV content")
9393
}
9494

95-
manifestVersion := spec["version"].(string)
96-
fmt.Println(fmt.Sprintf("Updating version references from %s to %s", manifestVersion, version))
95+
fmt.Println(fmt.Sprintf("Updating version references from %s to %s", oldVersion, newVersion))
9796

98-
spec["version"] = version
99-
spec["replaces"] = "file-integrity-operator.v" + manifestVersion
97+
spec["version"] = newVersion
98+
spec["replaces"] = "file-integrity-operator.v" + oldVersion
10099

101-
metadata["name"] = strings.Replace(metadata["name"].(string), manifestVersion, version, 1)
100+
metadata["name"] = strings.Replace(metadata["name"].(string), oldVersion, newVersion, 1)
102101

103102
annotations := metadata["annotations"].(map[string]interface{})
104-
annotations["olm.skipRange"] = strings.Replace(annotations["olm.skipRange"].(string), manifestVersion, version, 1)
103+
annotations["olm.skipRange"] = strings.Replace(annotations["olm.skipRange"].(string), oldVersion, newVersion, 1)
105104

106-
fmt.Println(fmt.Sprintf("Updated version references from %s to %s", manifestVersion, version))
105+
fmt.Println(fmt.Sprintf("Updated version references from %s to %s", oldVersion, newVersion))
107106
}
108107

109108
func replaceIcon(csv map[string]interface{}) {
@@ -170,20 +169,21 @@ func main() {
170169
var csv map[string]interface{}
171170

172171
manifestsDir := os.Args[1]
173-
version := os.Args[2]
172+
oldVersion := os.Args[2]
173+
newVersion := os.Args[3]
174174

175175
csvFilename := getInputCSVFilePath(manifestsDir)
176176
fmt.Println(fmt.Sprintf("Found manifest in %s", csvFilename))
177177

178178
readCSV(csvFilename, &csv)
179179

180180
addRequiredAnnotations(csv)
181-
replaceVersion(version, csv)
181+
replaceVersion(oldVersion, newVersion, csv)
182182
replaceIcon(csv)
183183
replaceImages(csv)
184184
removeRelated(csv)
185185

186-
outputCSVFilename := getOutputCSVFilePath(manifestsDir, version)
186+
outputCSVFilename := getOutputCSVFilePath(manifestsDir, newVersion)
187187
replaceCSV(csvFilename, outputCSVFilename, csv)
188-
fmt.Println(fmt.Sprintf("Replaced CSV manifest for %s", version))
188+
fmt.Println(fmt.Sprintf("Replaced CSV manifest for %s", newVersion))
189189
}

bundle.openshift.Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.22 as builder
33
COPY . .
44
WORKDIR bundle-hack
55

6-
ARG FIO_VERSION="1.3.5-dev"
6+
ARG FIO_OLD_VERSION="1.3.5"
7+
ARG FIO_NEW_VERSION="1.3.6"
78

8-
RUN go run ./update_csv.go ../bundle/manifests ${FIO_VERSION}
9+
RUN go run ./update_csv.go ../bundle/manifests ${FIO_OLD_VERSION} ${FIO_NEW_VERSION}
910
RUN ./update_bundle_annotations.sh
1011

1112
FROM scratch
1213

1314
LABEL name=openshift-file-integrity-operator-bundle
14-
LABEL version=${FIO_VERSION}
15+
LABEL version=${FIO_NEW_VERSION}
1516
LABEL summary='OpenShift File Integrity Operator'
1617
LABEL maintainer='Infrastructure Security and Compliance Team <[email protected]>'
1718

bundle/manifests/file-integrity-operator.clusterserviceversion.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ metadata:
2020
capabilities: Seamless Upgrades
2121
categories: Monitoring,Security
2222
createdAt: "2024-11-21T18:02:08Z"
23-
olm.skipRange: '>=1.0.0 <1.3.5-dev'
23+
olm.skipRange: '>=1.0.0 <1.3.6'
2424
operatorframework.io/cluster-monitoring: "true"
2525
operatorframework.io/suggested-namespace: openshift-file-integrity
2626
operators.openshift.io/infrastructure-features: '["disconnected", "fips"]'
@@ -35,7 +35,7 @@ metadata:
3535
operatorframework.io/arch.s390x: supported
3636
operatorframework.io/os.linux: supported
3737
operatorframework.io/os.zos: supported
38-
name: file-integrity-operator.v1.3.5-dev
38+
name: file-integrity-operator.v1.3.6
3939
namespace: placeholder
4040
spec:
4141
apiservicedefinitions: {}
@@ -319,4 +319,5 @@ spec:
319319
relatedImages:
320320
- image: quay.io/file-integrity-operator/file-integrity-operator:latest
321321
name: operator
322-
version: 1.3.5-dev
322+
version: 1.3.6
323+
replaces: file-integrity-operator.v1.3.5

catalog/preamble.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"package": "file-integrity-operator",
1414
"entries": [
1515
{
16-
"name": "file-integrity-operator.v1.3.5-dev",
17-
"skipRange": ">=1.0.0 <1.3.5-dev"
16+
"name": "file-integrity-operator.v1.3.6",
17+
"skipRange": ">=1.0.0 <1.3.6"
1818
}
1919
]
2020
}

version.Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
33
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
44

5-
VERSION?=1.3.5-dev
5+
VERSION?=1.3.6

version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package version
22

33
var (
4-
Version = "1.3.5-dev"
4+
Version = "1.3.6"
55
)

0 commit comments

Comments
 (0)