File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,11 @@ fatal() { error "$@"; exit 1; }
26
26
try () { " $@ " || fatal " '$@ ' failed" ; }
27
27
28
28
PY_VER=2
29
- while getopts :p: opt " $@ " ; do
29
+ API_VER=3
30
+ while getopts :p:a: opt " $@ " ; do
30
31
case $opt in
31
32
p) PY_VER=$OPTARG ;;
33
+ a) API_VER=$OPTARG ;;
32
34
:) fatal " Option -${OPTARG} requires a value" ;;
33
35
' ?' ) fatal " Unknown option: -${OPTARG} " ;;
34
36
* ) fatal " Internal error: opt=${opt} " ;;
@@ -41,6 +43,11 @@ case $PY_VER in
41
43
* ) fatal " Wrong python version (2 or 3)" ;;
42
44
esac
43
45
46
+ case $API_VER in
47
+ 3|4) ;;
48
+ * ) fatal " Wrong API version (3 or 4)" ;;
49
+ esac
50
+
44
51
for req in \
45
52
curl \
46
53
docker \
@@ -130,6 +137,7 @@ timeout = 10
130
137
[local]
131
138
url = http://localhost:8080
132
139
private_token = $TOKEN
140
+ api_version = $API_VER
133
141
EOF
134
142
135
143
log " Config file content ($CONFIG ):"
You can’t perform that action at this time.
0 commit comments