Skip to content

Commit

Permalink
chore: update cli and snyk-to-html download url (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-luong authored Aug 7, 2024
1 parent 62bb287 commit d5e2f84
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions update-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SCRIPT_DIR="$(cd -P "$(dirname -- "${SCRIPT_PATH}")" >/dev/null 2>&1 && pwd)"
METADATA_CLI=$(curl https://static.snyk.io/cli/latest/release.json)
echo "Using latest CLI version, which is $(echo "$METADATA_CLI" | jq -r '.version')"

SNYK_INTEGRATION_NAME='TEAMCITY_PLUGIN'
CLI_VERSION='latest'
OUTPUT_DIR="$SCRIPT_DIR/teamcity-snyk-security-plugin-agent/src/runner/bin/$CLI_VERSION"

Expand All @@ -17,16 +18,16 @@ fi

mkdir -p "$OUTPUT_DIR"

curl --compressed -o "$OUTPUT_DIR/snyk-alpine" "https://static.snyk.io/cli/$CLI_VERSION/snyk-alpine"
curl --compressed -o "$OUTPUT_DIR/snyk-macos" "https://static.snyk.io/cli/$CLI_VERSION/snyk-macos"
curl --compressed -o "$OUTPUT_DIR/snyk-linux" "https://static.snyk.io/cli/$CLI_VERSION/snyk-linux"
curl --compressed -o "$OUTPUT_DIR/snyk-win.exe" "https://static.snyk.io/cli/$CLI_VERSION/snyk-win.exe"
curl --compressed -o "$OUTPUT_DIR/snyk-linux-arm64" "https://static.snyk.io/cli/$CLI_VERSION/snyk-linux-arm64"
curl --compressed -o "$OUTPUT_DIR/snyk-alpine" "https://downloads.snyk.io/cli/$CLI_VERSION/snyk-alpine?utm_source=$SNYK_INTEGRATION_NAME" || curl --compressed -o "$OUTPUT_DIR/snyk-alpine" "https://static.snyk.io/cli/$CLI_VERSION/snyk-alpine"
curl --compressed -o "$OUTPUT_DIR/snyk-macos" "https://downloads.snyk.io/cli/$CLI_VERSION/snyk-macos?utm_source=$SNYK_INTEGRATION_NAME" || curl --compressed -o "$OUTPUT_DIR/snyk-macos" "https://static.snyk.io/cli/$CLI_VERSION/snyk-macos"
curl --compressed -o "$OUTPUT_DIR/snyk-linux" "https://downloads.snyk.io/cli/$CLI_VERSION/snyk-linux?utm_source=$SNYK_INTEGRATION_NAME" || curl --compressed -o "$OUTPUT_DIR/snyk-linux" "https://static.snyk.io/cli/$CLI_VERSION/snyk-linux"
curl --compressed -o "$OUTPUT_DIR/snyk-win.exe" "https://downloads.snyk.io/cli/$CLI_VERSION/snyk-win.exe?utm_source=$SNYK_INTEGRATION_NAME" || curl --compressed -o "$OUTPUT_DIR/snyk-win.exe" "https://static.snyk.io/cli/$CLI_VERSION/snyk-win.exe"
curl --compressed -o "$OUTPUT_DIR/snyk-linux-arm64" "https://downloads.snyk.io/cli/$CLI_VERSION/snyk-linux-arm64?utm_source=$SNYK_INTEGRATION_NAME" || curl --compressed -o "$OUTPUT_DIR/snyk-linux-arm64" "https://static.snyk.io/cli/$CLI_VERSION/snyk-linux-arm64"

curl --compressed -o "$OUTPUT_DIR/snyk-to-html-alpine" "https://static.snyk.io/snyk-to-html/latest/snyk-to-html-alpine"
curl --compressed -o "$OUTPUT_DIR/snyk-to-html-macos" "https://static.snyk.io/snyk-to-html/latest/snyk-to-html-macos"
curl --compressed -o "$OUTPUT_DIR/snyk-to-html-linux" "https://static.snyk.io/snyk-to-html/latest/snyk-to-html-linux"
curl --compressed -o "$OUTPUT_DIR/snyk-to-html-win.exe" "https://static.snyk.io/snyk-to-html/latest/snyk-to-html-win.exe"
curl --compressed -o "$OUTPUT_DIR/snyk-to-html-alpine" "https://downloads.snyk.io/snyk-to-html/latest/snyk-to-html-alpine?utm_source=$SNYK_INTEGRATION_NAME" || curl --compressed -o "$OUTPUT_DIR/snyk-to-html-alpine" "https://static.snyk.io/snyk-to-html/latest/snyk-to-html-alpine"
curl --compressed -o "$OUTPUT_DIR/snyk-to-html-macos" "https://downloads.snyk.io/snyk-to-html/latest/snyk-to-html-macos?utm_source=$SNYK_INTEGRATION_NAME" || curl --compressed -o "$OUTPUT_DIR/snyk-to-html-macos" "https://static.snyk.io/snyk-to-html/latest/snyk-to-html-macos"
curl --compressed -o "$OUTPUT_DIR/snyk-to-html-linux" "https://downloads.snyk.io/snyk-to-html/latest/snyk-to-html-linux?utm_source=$SNYK_INTEGRATION_NAME" || curl --compressed -o "$OUTPUT_DIR/snyk-to-html-linux" "https://static.snyk.io/snyk-to-html/latest/snyk-to-html-linux"
curl --compressed -o "$OUTPUT_DIR/snyk-to-html-win.exe" "https://downloads.snyk.io/snyk-to-html/latest/snyk-to-html-win.exe?utm_source=$SNYK_INTEGRATION_NAME" || curl --compressed -o "$OUTPUT_DIR/snyk-to-html-win.exe" "https://static.snyk.io/snyk-to-html/latest/snyk-to-html-win.exe"
chmod -R +x "$OUTPUT_DIR"

echo "Done. Don't forget to update the changelog."
Expand Down

0 comments on commit d5e2f84

Please sign in to comment.