Skip to content

Commit 3cf2a3d

Browse files
committed
patch version automatically in the release script
1 parent 5d1bf0a commit 3cf2a3d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

UPSTREAM-MERGE.sh

+5
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ git add README-sdk.md
119119
echo "$version" > UPSTREAM-VERSION
120120
git add UPSTREAM-VERSION
121121

122+
# Edit the version in the patch so that -ocp is properly appended
123+
sed -i.bak -e "s/+export SIMPLE_VERSION=.*/+export SIMPLE_VERSION = ${version}-ocp/" patches/03-setversion.patch
124+
rm -f patches/03-setversion.patch.bak
125+
git add patches/03-setversion.patch
126+
122127
# just to make sure an old version merge is not being made
123128
git diff --staged --quiet && { echo "No changed files in merge?! Aborting."; exit 1; }
124129

patches/03-setversion.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ diff -up ./Makefile.setversion ./Makefile
77
# Build-time variables to inject into binaries
88
-export SIMPLE_VERSION = $(shell (test "$(shell git describe)" = "$(shell git describe --abbrev=0)" && echo $(shell git describe)) || echo $(shell git describe --abbrev=0)+git)
99
-export GIT_VERSION = $(shell git describe --dirty --tags --always)
10-
+export SIMPLE_VERSION = v1.10.1-ocp
10+
+export SIMPLE_VERSION = v1.13.1-ocp
1111
+export GIT_VERSION = $(SIMPLE_VERSION)
1212
export GIT_COMMIT = $(shell git rev-parse HEAD)
1313
export K8S_VERSION = 1.19.4

0 commit comments

Comments
 (0)