separation of concern of creating a PR vs code to change the version
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSIONS=$(gh api -H "Accept: application/vnd.github+json" /repos/github/codeql-cli-binaries/releases | jq '.[].tag_name' | head -2)
|
||||
VERSIONS=$(gh api -H "Accept: application/vnd.github+json" /repos/github/codeql-cli-binaries/releases | jq -r '.[].tag_name' | head -2)
|
||||
|
||||
LATEST_VERSION=$(echo $VERSIONS | awk '{ print $1 }' | sed "s/\"//g")
|
||||
PREVIOUS_VERSION=$(echo $VERSIONS | awk '{ print $2 }' | sed "s/\"//g")
|
||||
# we are exporting these variables so that we can access these variables in the workflow
|
||||
LATEST_VERSION=$(echo $VERSIONS | awk '{ print $1 }')
|
||||
PREVIOUS_VERSION=$(echo $VERSIONS | awk '{ print $2 }')
|
||||
|
||||
sed -i "s/$PREVIOUS_VERSION/$LATEST_VERSION/g" .github/workflows/main.yml
|
||||
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
|
||||
echo "PREVIOUS_VERSION=$PREVIOUS_VERSION" >> $GITHUB_ENV
|
||||
|
||||
sed -i "s/$PREVIOUS_VERSION/$LATEST_VERSION/g" supported_cli_versions.json
|
||||
sed -i "s/$PREVIOUS_VERSION/$LATEST_VERSION/g" extensions/ql-vscode/src/vscode-tests/ensureCli.ts
|
||||
|
||||
Reference in New Issue
Block a user