diff options
author | Tilo Spannagel <development@tilosp.de> | 2018-11-15 22:11:34 +0100 |
---|---|---|
committer | Tilo Spannagel <development@tilosp.de> | 2018-11-15 22:11:34 +0100 |
commit | 99d823806e825d09c5dea58cbaacd35077943745 (patch) | |
tree | ac6ebe444e2db80ff7643d4cd4cced8f54226858 /update.sh | |
parent | 0ebd8831132980bdc04b61d0716fac255ced7bc0 (diff) |
Simplify travis.yml updates
Signed-off-by: Tilo Spannagel <development@tilosp.de>
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -97,7 +97,7 @@ function create_variant() { fi for arch in i386 amd64; do - travisEnv='\n - env: VERSION='"$1"' VARIANT='"$variant"' ARCH='"$arch$travisEnv" + travisEnv=' - env: VERSION='"$1"' VARIANT='"$variant"' ARCH='"$arch"'\n'"$travisEnv" done } @@ -160,9 +160,10 @@ for version in "${versions_beta[@]}"; do fi done +# remove everything after '- stage: test images' +travis="$(awk '!p; /- stage: test images/ {p=1}' .travis.yml)" +echo "$travis" > .travis.yml + # replace the fist '-' with ' ' travisEnv="$(echo "$travisEnv" | sed '0,/-/{s/-/ /}')" - -# update .travis.yml -travis="$(awk -v 'RS=\n\n' '$1 == "-" && $2 == "stage:" && $3 == "test" && $4 == "images" { $0 = " - stage: test images'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)" -echo "$travis" > .travis.yml +printf "$travisEnv" >> .travis.yml |