Skip to content

Commit 35f458d

Browse files
committed
Added CI make bump action (#1255)
* Added CI make bump action * Extract minor version from major.minor.patch version
1 parent daf5df7 commit 35f458d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.ci/make.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,18 @@ fi
154154

155155
if [[ "$CMD" == "bump" ]]; then
156156
# Change version to src/Client.php
157-
# sed -i "s/const VERSION = '[0-9]\+.[0-9]\+.[0-9]\+\(-dev\)\?'/const VERSION = '$VERSION'/g" $repo/src/Client.php
157+
sed -i "s/const VERSION = '[0-9]\+\.[0-9]\+\.[0-9]\+'/const VERSION = '$VERSION'/" $repo/src/Client.php
158158

159-
# Change version to .ci/test-matrix.yml
160-
161159
# Change version to .github/workflows/unified-release.yml
160+
sed -i "s/[0-9]\+\.[0-9]\+\.[0-9]\+-SNAPSHOT/$VERSION-SNAPSHOT/" $repo/.github/workflows/unified-release.yml
161+
162+
MINOR_VERSION=`echo $VERSION | grep -Eo "[0-9]+.[0-9]+"`
163+
164+
# Change version to .ci/test-matrix.yml
165+
sed -i "s/[0-9]\+\.[0-9]\+-SNAPSHOT/$MINOR_VERSION-SNAPSHOT/" $repo/.ci/test-matrix.yml
162166

167+
# Change version to .github/workflows/test.yml
168+
sed -i "s/es-version: \[[0-9]\+\.[0-9]\+\.\?[0-9]\?-SNAPSHOT\]/es-version: \[$MINOR_VERSION-SNAPSHOT\]/" $repo/.github/workflows/test.yml
163169
fi
164170

165171
if [[ "$CMD" == "codegen" ]]; then

0 commit comments

Comments
 (0)