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

Commit 776c330

Browse files
committed
Use non-api hackish way to get the latest CompliaceAsCode release
1 parent 6098928 commit 776c330

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ script:
2828
- ./build-for-osx.sh
2929
# Parse release page json to obtain link to latest content zip file and download it
3030
- |
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"`
31+
REL_TAG=`curl -s "https://github.com/ComplianceAsCode/content/releases/latest" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}'`
32+
REL_TAG_NUM=`echo ${REL_TAG} | cut -d"v" -f2`
33+
DWN_LINK=https://github.com/ComplianceAsCode/content/releases/download/${REL_TAG}/scap-security-guide-${REL_TAG_NUM}.zip
3234
if [ -z "${DWN_LINK}" ] ; then
3335
echo "Could not get the ZIP URL! It is empty!"
3436
exit 1

0 commit comments

Comments
 (0)