22
33if ! [ -z ${INPUT_APIMCLIVERSION} ]; then
44 echo " Downloading specified APIM-CLI version: ${INPUT_APIMCLIVERSION} "
5- wget -qO- https://github.com/Axway-API-Management-Plus/apim-cli/releases/download/apimcli-${INPUT_APIMCLIVERSION} /axway-apimcli-${INPUT_APIMCLIVERSION} .tar.gz | tar xvfz - -C /
5+ curl -qO- https://github.com/Axway-API-Management-Plus/apim-cli/releases/download/apimcli-${INPUT_APIMCLIVERSION} /axway-apimcli-${INPUT_APIMCLIVERSION} .tar.gz | tar xvfz - -C /
66 CLI=/apim-cli-${INPUT_APIMCLIVERSION} /scripts/apim.sh
77else
88 CLI=/apim-cli-1.5.1/scripts/apim.sh
@@ -18,7 +18,7 @@ if ! [ -z ${INPUT_USERDIRECTORY} ];then
1818 ls -1
1919 for userDirectory in ` find . -mindepth 1 -type d`
2020 do
21- $CLI user import ${apimCLIArgs} -c ${userDirectory} /user-config.json
21+ $CLI user import ${apimCLIArgs} -c ${userDirectory} /user-config.json || exit 99 ;
2222 done
2323fi
2424
@@ -30,7 +30,7 @@ if ! [ -z ${INPUT_ORGDIRECTORY} ];then
3030 ls -1
3131 for orgDirectory in ` find . -mindepth 1 -type d`
3232 do
33- $CLI org import ${apimCLIArgs} -c ${orgDirectory} /org-config.json
33+ $CLI org import ${apimCLIArgs} -c ${orgDirectory} /org-config.json || exit 99 ;
3434 done
3535fi
3636
@@ -42,7 +42,7 @@ if ! [ -z ${INPUT_APPDIRECTORY} ];then
4242 ls -1
4343 for appDirectory in ` find . -mindepth 1 -type d`
4444 do
45- $CLI app import ${apimCLIArgs} -c ${appDirectory} /application-config.json
45+ $CLI app import ${apimCLIArgs} -c ${appDirectory} /application-config.json || exit 99 ;
4646 done
4747fi
4848
@@ -54,7 +54,7 @@ if ! [ -z ${INPUT_APIDIRECTORY} ];then
5454 ls -1
5555 for apiDirectory in ` find . -mindepth 1 -type d`
5656 do
57- $CLI api import ${apimCLIArgs} -c ${apiDirectory} /api-config.json -force
57+ $CLI api import ${apimCLIArgs} -c ${apiDirectory} /api-config.json -force || exit 99 ;
5858 done
5959fi
6060
0 commit comments