Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit 6098928

Browse files
committed
Break out wget and curl commands to get SSG zip
1 parent 172a6ea commit 6098928

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ before_script:
2727
script:
2828
- ./build-for-osx.sh
2929
# Parse release page json to obtain link to latest content zip file and download it
30-
- wget `curl -s https://api.github.com/repos/ComplianceAsCode/content/releases/latest?access_token=$GITHUB_TOKEN | jq -r ".assets[] | select(.name | test(\"(scap-security-guide-[0-9].[0-9].[0-9]*).zip\")) | .browser_download_url"` -O ssg.zip
30+
- |
31+
DWN_LINK=`curl -s https://api.github.com/repos/ComplianceAsCode/content/releases/latest?access_token=$GITHUB_TOKEN | jq -r ".assets[] | select(.name | test(\"(scap-security-guide-[0-9].[0-9].[0-9]*).zip\")) | .browser_download_url"`
32+
if [ -z "${DWN_LINK}" ] ; then
33+
echo "Could not get the ZIP URL! It is empty!"
34+
exit 1
35+
fi
36+
- wget "${DWN_LINK}" -O ssg.zip
3137
- mkdir -p `pwd`/build-osx/scap-workbench.app/Contents/Resources/ssg/ && unzip ssg.zip && cp -a scap-security-guide-*/* `pwd`/build-osx/scap-workbench.app/Contents/Resources/ssg/
3238
- cd build-osx && sh osx-create-dmg.sh
3339

0 commit comments

Comments
 (0)