workflow to automatically bump cli version if different from the current version

This commit is contained in:
Taj
2022-12-13 22:19:07 +00:00
parent bce5d420d6
commit 3f39af2840
2 changed files with 53 additions and 0 deletions

9
scripts/replace-cli-version.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
VERSIONS=$(gh api -H "Accept: application/vnd.github+json" /repos/github/codeql-cli-binaries/releases | jq '.[].tag_name' | head -2)
LATEST_VERSION=$(echo $VERSIONS | awk '{ print $1 }' | sed "s/\"//g")
PREVIOUS_VERSION=$(echo $VERSIONS | awk '{ print $2 }' | sed "s/\"//g")
sed -i "s/$PREVIOUS_VERSION/$LATEST_VERSION/g" .github/workflows/main.yml
sed -i "s/$PREVIOUS_VERSION/$LATEST_VERSION/g" extensions/ql-vscode/src/vscode-tests/ensureCli.ts