Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions .github/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@
#
# Targets:
# ---------------------------
# assemble <VERSION> : build client artefacts with version
# bump <VERSION> : bump client internals to version
# codegen <VERSION> : generate endpoints
# docsgen <VERSION> : generate documentation
# examplegen : generate the doc examples
# clean : clean workspace
# assemble <VERSION> : build client artefacts with version
# bump <VERSION> : bump client internals to version
# bumpmatrix <VERSION> : bump stack version in test matrix to version
# codegen <VERSION> : generate endpoints
# docsgen <VERSION> : generate documentation
# examplegen : generate the doc examples
# clean : clean workspace
#
# ------------------------------------------------------- #

# ------------------------------------------------------- #
# Bootstrap
# ------------------------------------------------------- #

script_path=$(dirname "$(realpath -s "$0")")
script_path=$(dirname "$(realpath "$0")")
repo=$(realpath "$script_path/../")

# shellcheck disable=SC1090
Expand Down Expand Up @@ -100,6 +101,15 @@ case $CMD in
# VERSION is BRANCH here for now
TASK_ARGS=("$VERSION")
;;
bumpmatrix)
if [ -v $VERSION ]; then
echo -e "\033[31;1mTARGET: bumpmatrix -> missing version parameter\033[0m"
exit 1
fi
echo -e "\033[36;1mTARGET: bump stack in test matrix to version $VERSION\033[0m"
TASK=bumpmatrix
TASK_ARGS=("$VERSION")
;;
*)
echo -e "\nUsage:\n\t $CMD is not supported right now\n"
exit 1
Expand Down Expand Up @@ -160,6 +170,13 @@ if [[ "$CMD" == "bump" ]]; then
exit 0
fi

if [[ "$CMD" == "bumpmatrix" ]]; then
TEST_CONFIG_FILE=.buildkite/pipeline.yml
sed -E -i.bak 's/[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT/'$VERSION'/g' $TEST_CONFIG_FILE
rm ${TEST_CONFIG_FILE}.bak
exit 0
fi

if [[ "$CMD" == "codegen" ]]; then
docker run \
--rm -v $repo:/code/elasticsearch-py \
Expand Down
Loading