DBZ-5082 wrapped components param to quites, loading as single string in script and added newline to eof

This commit is contained in:
Martin Medek 2022-05-05 11:43:35 +02:00 committed by Jiří Novotný
parent 23835d8f6a
commit 68af2ce985
2 changed files with 3 additions and 14 deletions

View File

@ -16,7 +16,7 @@ freeStyleJob('prepare-maven-artifact-check') {
steps {
shell('''
jenkins-jobs/scripts/maven-artifact-check.sh -u $ARTIFACT_URL --components $COMPONENTS
jenkins-jobs/scripts/maven-artifact-check.sh -u $ARTIFACT_URL --components "$COMPONENTS"
''')
}
}
}

View File

@ -17,18 +17,7 @@ while true; do
case "$1" in
-f | --file ) ARTIFACT_FILE=$2; shift; shift ;;
-u | --url ) ARTIFACT_URL=$2; shift; shift ;;
--components ) shift;
EXPECTED_COMPONENTS=();
param=$1;
while [ "${param:0:1}" != "-" ] && [ -n "$param" ]; do
EXPECTED_COMPONENTS+=("$1");
shift;
param=$1;
if [ "$param" == "--" ]; then
shift;
param=$1;
fi
done ;;
--components ) EXPECTED_COMPONENTS=$2 shift; shift ;;
-h | --help ) PRINT_HELP=true; shift ;;
-- ) shift; break ;;
* ) break ;;