Skip to content

Commit 7602826

Browse files
add bumpmatrix command to make.sh (#3168) (#3177)
(cherry picked from commit 011442f) Co-authored-by: Miguel Grinberg <miguel.grinberg@gmail.com>
1 parent 74d105a commit 7602826

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

.github/make.sh

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,21 @@
1111
#
1212
# Targets:
1313
# ---------------------------
14-
# assemble <VERSION> : build client artefacts with version
15-
# bump <VERSION> : bump client internals to version
16-
# codegen <VERSION> : generate endpoints
17-
# docsgen <VERSION> : generate documentation
18-
# examplegen : generate the doc examples
19-
# clean : clean workspace
14+
# assemble <VERSION> : build client artefacts with version
15+
# bump <VERSION> : bump client internals to version
16+
# bumpmatrix <VERSION> : bump stack version in test matrix to version
17+
# codegen <VERSION> : generate endpoints
18+
# docsgen <VERSION> : generate documentation
19+
# examplegen : generate the doc examples
20+
# clean : clean workspace
2021
#
2122
# ------------------------------------------------------- #
2223

2324
# ------------------------------------------------------- #
2425
# Bootstrap
2526
# ------------------------------------------------------- #
2627

27-
script_path=$(dirname "$(realpath -s "$0")")
28+
script_path=$(dirname "$(realpath "$0")")
2829
repo=$(realpath "$script_path/../")
2930

3031
# shellcheck disable=SC1090
@@ -100,6 +101,15 @@ case $CMD in
100101
# VERSION is BRANCH here for now
101102
TASK_ARGS=("$VERSION")
102103
;;
104+
bumpmatrix)
105+
if [ -v $VERSION ]; then
106+
echo -e "\033[31;1mTARGET: bumpmatrix -> missing version parameter\033[0m"
107+
exit 1
108+
fi
109+
echo -e "\033[36;1mTARGET: bump stack in test matrix to version $VERSION\033[0m"
110+
TASK=bumpmatrix
111+
TASK_ARGS=("$VERSION")
112+
;;
103113
*)
104114
echo -e "\nUsage:\n\t $CMD is not supported right now\n"
105115
exit 1
@@ -160,6 +170,13 @@ if [[ "$CMD" == "bump" ]]; then
160170
exit 0
161171
fi
162172

173+
if [[ "$CMD" == "bumpmatrix" ]]; then
174+
TEST_CONFIG_FILE=.buildkite/pipeline.yml
175+
sed -E -i.bak 's/[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT/'$VERSION'/g' $TEST_CONFIG_FILE
176+
rm ${TEST_CONFIG_FILE}.bak
177+
exit 0
178+
fi
179+
163180
if [[ "$CMD" == "codegen" ]]; then
164181
docker run \
165182
--rm -v $repo:/code/elasticsearch-py \

0 commit comments

Comments
 (0)