diff options
author | David Spickett <david.spickett@linaro.org> | 2020-04-27 14:15:51 +0100 |
---|---|---|
committer | David Spickett <david.spickett@linaro.org> | 2020-04-30 09:56:12 +0100 |
commit | 5e5cdf3372932f00151ceff9388165201ebe5106 (patch) | |
tree | 80f8bf9ec3b1ec4605d4348f85e60eac258892ed /jenkins.sh | |
parent | 49aa56fa328bd43ea470c1c3cda41edbd970a40f (diff) |
Shellcheck fixes round 4
Fixes for:
https://github.com/koalaman/shellcheck/wiki/SC2207
Are using the bash 4.x 'mapfile' syntax where the
input to the array is seperated by newlines.
If it's separated by spaces we use 'read' instead.
Support for selecting libc in MakeRelease.job was
removed in 3fa23da28ad73d0fe4b512c4aab269b5280a6650.
So remove references to "libc" which were expanding
to nothing anyway.
In tcwg-llvm-common.sh PROJECTS->BRANCHED_PROJECTS
is not strictly needed. However shellcheck can't
tell that the local PROJECTS in this file is
different from the PROJECTS in tcwg-llvm-build.sh.
Change-Id: Ie55968e3bf185d0bd5795fe48014636cda1009bc
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-x | jenkins.sh | 23 |
1 files changed, 8 insertions, 15 deletions
@@ -53,11 +53,14 @@ upload_to_logserver() ssh $logopts $logserver mkdir -p $basedir/$dir || status=1 # Copy over the build logs - makelog_list=($(read_var ${user_workspace}/build-artifacts.txt 'log_make_[^=]*')) + mapfile -t makelog_list < <(\ + read_var ${user_workspace}/build-artifacts.txt 'log_make_[^=]*') # shellcheck disable=SC2154 if test x"${canadian}" = x"true"; then - makelog_list+=($(read_var ${user_workspace}/canadian-build1-artifacts.txt 'log_make_[^=]*')) - makelog_list+=($(read_var ${user_workspace}/canadian-build2-artifacts.txt 'log_make_[^=]*')) + mapfile -t -O "${#makelog_list[@]}" makelog_list < <(\ + read_var ${user_workspace}/canadian-build1-artifacts.txt 'log_make_[^=]*') + mapfile -t -O "${#makelog_list[@]}" makelog_list < <(\ + read_var ${user_workspace}/canadian-build2-artifacts.txt 'log_make_[^=]*') fi for makelog in "${makelog_list[@]}"; do cp ${makelog} ${logs_dir}/ || status=1 @@ -139,9 +142,6 @@ abe_dir= # This is where all the builds go user_workspace="${WORKSPACE}" -# The files in this directory are shared across all platforms -shared="${HOME}/workspace/shared" - # This is an optional directory for the reference copy of the git repositories. git_reference="${HOME}/snapshots-ref" @@ -237,13 +237,13 @@ fi # set default values for options to make life easier user_snapshots="${user_workspace}/snapshots" -arch="$(uname -m)" - if [ x"$logserver" = x"" ] && [ x"$logname" != x"" ]; then echo "ERROR: \$logname is not provided, but \$logserver is set to $logserver" exit 1 fi # Now that all variables from $logname template are known, calculate log dir. +declare dir +# Eval here because logname can include other variables at this point. eval dir="$logname" # Split $logserver into "server:port:path". @@ -502,13 +502,6 @@ Files-Pattern: * License-Type: open EOF -if test x"${tars}" = x; then - # date="$(${gcc} --version | head -1 | cut -d ' ' -f 4 | tr -d ')')" - date="$(date +%Y%m%d)" -else - date=${release} -fi - echo "Build parameters: ${orig_parameters[*]}" # Canadian Crosses are a win32 hosted cross toolchain built on a Linux |