X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fmaven-deploy.sh;h=6d4165edf59d16d53cb088b910388b8b793a932b;hb=7ff047e6606b384cd84cd6dbc5bea3d93e29357f;hp=fc8e2465c224f6921fc3c5ffbf83fd3a86bfd5a4;hpb=ed320523c5e3c70a6f54cf9f57369f8305f9b342;p=releng%2Fglobal-jjb.git diff --git a/shell/maven-deploy.sh b/shell/maven-deploy.sh index fc8e2465..6d4165ed 100644 --- a/shell/maven-deploy.sh +++ b/shell/maven-deploy.sh @@ -20,10 +20,13 @@ set -eu -o pipefail m2repo_dir="$WORKSPACE/m2repo" nexus_repo_url="$NEXUS_URL/content/repositories/$NEXUS_REPO" +lftools_activate + # Remove metadata files that were not updated. set +e # Temporarily disable to run diff command. -metadata_files=($(diff -s -r "$m2repo_dir" "$WORKSPACE/m2repo-backup" \ - | grep 'Files .* and .* are identical' | awk '{print $2}')) +IFS=" " read -r -a metadata_files <<< "$(diff -s -r "$m2repo_dir" "$WORKSPACE/m2repo-backup" \ + | grep 'Files .* and .* are identical' \ + | awk '{print $2}')" set -e # Re-enable. set +u # $metadata_files could be unbound if project is new.