1
1
#! /usr/bin/env bash
2
-
3
2
# ------------------------------------------------------- #
4
3
#
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
7
5
#
8
6
# Must be called: ./.ci/make.sh <target> <params>
9
7
#
10
8
# Version: 1.1.0
11
9
#
12
10
# Targets:
13
11
# ---------------------------
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
20
19
#
21
20
# ------------------------------------------------------- #
22
21
23
22
# ------------------------------------------------------- #
24
23
# Bootstrap
25
24
# ------------------------------------------------------- #
26
-
27
25
script_path=$( dirname " $( realpath -s " $0 " ) " )
28
26
repo=$( realpath " $script_path /../" )
29
27
generator=$( realpath " $script_path /../../elastic-client-generator-js" )
@@ -38,6 +36,7 @@ set -euo pipefail
38
36
39
37
product=" elastic/elasticsearch-js"
40
38
output_folder=" .ci/output"
39
+ codegen_folder=" .ci/output"
41
40
OUTPUT_DIR=" $repo /${output_folder} "
42
41
# REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
43
42
NODE_JS_VERSION=18
@@ -48,10 +47,6 @@ echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
48
47
echo -e " \033[34;1mINFO:\033[0m VERSION ${STACK_VERSION} \033[0m"
49
48
echo -e " \033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR} \033[0m"
50
49
51
- # ------------------------------------------------------- #
52
- # Parse Command
53
- # ------------------------------------------------------- #
54
-
55
50
case $CMD in
56
51
clean)
57
52
echo -e " \033[36;1mTARGET: clean workspace $output_folder \033[0m"
@@ -104,8 +99,21 @@ case $CMD in
104
99
# VERSION is BRANCH here for now
105
100
TASK_ARGS=(" $VERSION " )
106
101
;;
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
+ ;;
107
111
* )
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"
109
117
exit 1
110
118
esac
111
119
0 commit comments