Skip to content

Commit cee5e81

Browse files
committed
Catch up make.sh to match other clients
1 parent 50e0bba commit cee5e81

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

.ci/make.sh

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
#!/usr/bin/env bash
2-
32
# ------------------------------------------------------- #
43
#
5-
# Skeleton for common build entry script for all elastic
6-
# clients. Needs to be adapted to individual client usage.
4+
# Build entry script for elasticsearch-js
75
#
86
# Must be called: ./.ci/make.sh <target> <params>
97
#
108
# Version: 1.1.0
119
#
1210
# Targets:
1311
# ---------------------------
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
12+
# assemble <VERSION> : build client artifacts with version
13+
# bump <VERSION> : bump client internals to version
14+
# bumpmatrix <VERSION> : bump stack version in test matrix to version
15+
# codegen : generate endpoints
16+
# docsgen <VERSION> : generate documentation
17+
# examplegen : generate the doc examples
18+
# clean : clean workspace
2019
#
2120
# ------------------------------------------------------- #
2221

2322
# ------------------------------------------------------- #
2423
# Bootstrap
2524
# ------------------------------------------------------- #
26-
2725
script_path=$(dirname "$(realpath -s "$0")")
2826
repo=$(realpath "$script_path/../")
2927
generator=$(realpath "$script_path/../../elastic-client-generator-js")
@@ -38,6 +36,7 @@ set -euo pipefail
3836

3937
product="elastic/elasticsearch-js"
4038
output_folder=".ci/output"
39+
codegen_folder=".ci/output"
4140
OUTPUT_DIR="$repo/${output_folder}"
4241
# REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
4342
NODE_JS_VERSION=18
@@ -48,10 +47,6 @@ echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
4847
echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"
4948
echo -e "\033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR}\033[0m"
5049

51-
# ------------------------------------------------------- #
52-
# Parse Command
53-
# ------------------------------------------------------- #
54-
5550
case $CMD in
5651
clean)
5752
echo -e "\033[36;1mTARGET: clean workspace $output_folder\033[0m"
@@ -104,8 +99,21 @@ case $CMD in
10499
# VERSION is BRANCH here for now
105100
TASK_ARGS=("$VERSION")
106101
;;
102+
bumpmatrix)
103+
if [ -v $VERSION ]; then
104+
echo -e "\033[31;1mTARGET: bumpmatrix -> missing version parameter\033[0m"
105+
exit 1
106+
fi
107+
echo -e "\033[36;1mTARGET: bump stack in test matrix to version $VERSION\033[0m"
108+
TASK=bumpmatrix
109+
TASK_ARGS=("$VERSION")
110+
;;
107111
*)
108-
echo -e "\nUsage:\n\t $CMD is not supported right now\n"
112+
echo -e "\n'$CMD' is not supported right now\n"
113+
echo -e "\nUsage:"
114+
echo -e "\t $0 release \$VERSION\n"
115+
echo -e "\t $0 bump \$VERSION"
116+
echo -e "\t $0 codegen \$VERSION"
109117
exit 1
110118
esac
111119

0 commit comments

Comments
 (0)