From 60cb915dae5cf0ab13a1c0c249396a4bfa0df7f9 Mon Sep 17 00:00:00 2001 From: Gabriel Becker Date: Mon, 20 Feb 2023 14:28:01 +0100 Subject: [PATCH] Use latest CaC/content package version when building for Mac OS X. --- .github/workflows/build.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e65763f1..ee2635d7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -72,11 +72,13 @@ jobs: popd - name: Build OSX Image run: | + REPOSITORY="ComplianceAsCode/content" chmod +x ./build-for-osx.sh ./build-for-osx.sh - REL_TAG=`curl -s "https://github.com/ComplianceAsCode/content/releases/latest" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}'` + wget -q -O- https://api.github.com/repos/${REPOSITORY}/releases/latest | jq -r '.tag_name' + REL_TAG=`wget -q -O- https://api.github.com/repos/${REPOSITORY}/releases/latest | jq -r '.tag_name'` REL_TAG_NUM=`echo ${REL_TAG} | cut -d"v" -f2` - DWN_LINK=https://github.com/ComplianceAsCode/content/releases/download/v0.1.63/scap-security-guide-0.1.63.zip + DWN_LINK="https://github.com/${REPOSITORY}/releases/download/${REL_TAG}/scap-security-guide-${REL_TAG_NUM}.zip" if [ -z "${DWN_LINK}" ]; then echo 'Could not get the ZIP URL! It is empty!'; exit 1; fi wget "${DWN_LINK}" -O ssg.zip 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/