|
11 | 11 | # |
12 | 12 | # Targets: |
13 | 13 | # --------------------------- |
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 |
20 | 21 | # |
21 | 22 | # ------------------------------------------------------- # |
22 | 23 |
|
23 | 24 | # ------------------------------------------------------- # |
24 | 25 | # Bootstrap |
25 | 26 | # ------------------------------------------------------- # |
26 | 27 |
|
27 | | -script_path=$(dirname "$(realpath -s "$0")") |
| 28 | +script_path=$(dirname "$(realpath "$0")") |
28 | 29 | repo=$(realpath "$script_path/../") |
29 | 30 |
|
30 | 31 | # shellcheck disable=SC1090 |
@@ -100,6 +101,15 @@ case $CMD in |
100 | 101 | # VERSION is BRANCH here for now |
101 | 102 | TASK_ARGS=("$VERSION") |
102 | 103 | ;; |
| 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 | + ;; |
103 | 113 | *) |
104 | 114 | echo -e "\nUsage:\n\t $CMD is not supported right now\n" |
105 | 115 | exit 1 |
@@ -160,6 +170,13 @@ if [[ "$CMD" == "bump" ]]; then |
160 | 170 | exit 0 |
161 | 171 | fi |
162 | 172 |
|
| 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 | + |
163 | 180 | if [[ "$CMD" == "codegen" ]]; then |
164 | 181 | docker run \ |
165 | 182 | --rm -v $repo:/code/elasticsearch-py \ |
|
0 commit comments