Skip to content

Commit 990cfae

Browse files
committed
Apply the GH release api call with regex to the non-fips installer
1 parent a145ef7 commit 990cfae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

codebuild/bin/install_awslc.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ fi
2727

2828
BUILD_DIR=$1
2929
INSTALL_DIR=$2
30+
GH_RELEASE_URL="https://api.github.com/repos/aws/aws-lc/releases"
3031

3132
if [[ ! -f "$(which clang)" ]]; then
3233
echo "Could not find clang"
3334
exit 1
3435
fi
3536

36-
# Ask GitHub for the latest release.
37-
AWSLC_VERSION=$(curl --silent "https://api.github.com/repos/aws/aws-lc/releases/latest" | \
38-
grep -Po '"tag_name": "\K.*?(?=")')
37+
# Ask GitHub for the latest v1.x release.
38+
AWSLC_VERSION=$(curl --silent "$GH_RELEASE_URL" | \
39+
grep -Po '"tag_name": "\Kv1.*?(?=")' |head -1)
3940

4041
mkdir -p "$BUILD_DIR"||true
4142
cd "$BUILD_DIR"

0 commit comments

Comments
 (0)