@@ -17,21 +17,28 @@ function usage() {
17
17
- update.sh 8 slim,stretch # Update only slim and stretch variants for version 8
18
18
- update.sh -s 8 slim,stretch # Update only slim and stretch variants for version 8, skip updating Alpine and Yarn
19
19
- update.sh . alpine # Update the alpine variant for all versions
20
+ - update.sh -t # Update .travis.yml only
20
21
21
22
OPTIONS:
22
23
-s Security update; skip updating the yarn and alpine versions.
24
+ -t Travis CI config update only
23
25
-h Show this message
24
26
25
27
EOF
26
28
}
27
29
28
30
SKIP=false
29
- while getopts " sh" opt; do
31
+ TRAVIS_CI_ONLY=false
32
+ while getopts " sth" opt; do
30
33
case " ${opt} " in
31
34
s)
32
35
SKIP=true
33
36
shift
34
37
;;
38
+ t)
39
+ TRAVIS_CI_ONLY=true
40
+ shift
41
+ ;;
35
42
h)
36
43
usage
37
44
exit
@@ -196,14 +203,15 @@ for version in "${versions[@]}"; do
196
203
baseuri=$( get_config " ${parentpath} " " baseuri" )
197
204
update_version=$( in_versions_to_update " ${version} " )
198
205
199
- [ " ${update_version} " -eq 0 ] && info " Updating version ${version} ..."
206
+ [ " ${update_version} " -eq 0 ] && [ true != " $TRAVIS_CI_ONLY " ] && info " Updating version ${version} ..."
200
207
201
208
# Get supported variants according the target architecture
202
209
# See details in function.sh
203
210
IFS=' ' read -ra variants <<< " $(get_variants " ${parentpath} " )"
204
211
205
212
if [ -f " ${version} /Dockerfile" ]; then
206
213
add_stage " ${baseuri} " " ${version} " " default"
214
+ [ true = " $TRAVIS_CI_ONLY " ] && continue
207
215
208
216
if [ " ${update_version} " -eq 0 ]; then
209
217
update_node_version " ${baseuri} " " ${versionnum} " " ${parentpath} /Dockerfile.template" " ${version} /Dockerfile" &
@@ -214,6 +222,7 @@ for version in "${versions[@]}"; do
214
222
# Skip non-docker directories
215
223
[ -f " ${version} /${variant} /Dockerfile" ] || continue
216
224
add_stage " ${baseuri} " " ${version} " " ${variant} "
225
+ [ true = " $TRAVIS_CI_ONLY " ] && continue
217
226
218
227
update_variant=$( in_variants_to_update " ${variant} " )
219
228
0 commit comments