@@ -27,24 +27,24 @@ jobs:
2727 latest_version=$(curl -s https://api.github.com/repos/github/codeql-cli-binaries/releases/latest | jq -r .tag_name)
2828 echo "Current CodeQL CLI version: $current_version"
2929 echo "Latest CodeQL CLI version: $latest_version"
30-
30+
3131 # Remove 'v' prefix if present for comparison with current version
3232 latest_clean=$(echo "$latest_version" | sed 's/^v//')
33-
33+
3434 if [ "$latest_clean" != "$current_version" ]; then
3535 echo "Updating CodeQL CLI from $current_version to $latest_clean"
3636 echo "update_needed=true" >> $GITHUB_OUTPUT
3737 echo "latest_version=$latest_clean" >> $GITHUB_OUTPUT
3838 echo "latest_version_tag=$latest_version" >> $GITHUB_OUTPUT
39-
39+
4040 # Update qlt.conf.json with all properties
4141 echo "Updating qlt.conf.json with all properties for version $latest_clean"
4242 jq --arg cli_version "$latest_clean" \
4343 --arg std_lib "codeql-cli/$latest_version" \
4444 --arg bundle "codeql-bundle-$latest_version" \
4545 '.CodeQLCLI = $cli_version | .CodeQLStandardLibrary = $std_lib | .CodeQLCLIBundle = $bundle' \
4646 qlt.conf.json > qlt.conf.json.tmp && mv qlt.conf.json.tmp qlt.conf.json
47-
47+
4848 echo "Updated qlt.conf.json contents:"
4949 cat qlt.conf.json
5050 else
@@ -77,18 +77,18 @@ jobs:
7777 run : |
7878 echo "Upgrading CodeQL pack lock files"
7979 echo "Finding all directories with qlpack.yml files..."
80-
80+
8181 # Find all directories containing qlpack.yml files
8282 find . -name "qlpack.yml" -type f | while read -r qlpack_file; do
8383 pack_dir=$(dirname "$qlpack_file")
8484 echo "Upgrading pack in directory: $pack_dir"
85-
85+
8686 # Change to the directory and run codeql pack upgrade
8787 cd "$pack_dir"
8888 codeql pack upgrade
8989 cd - > /dev/null
9090 done
91-
91+
9292 echo "Finished upgrading all CodeQL pack lock files"
9393
9494 - name : Create Pull Request
9898 title : " Upgrade CodeQL CLI dependency to ${{ steps.check-version.outputs.latest_version_tag }}"
9999 body : |
100100 This PR upgrades the CodeQL CLI version to ${{ steps.check-version.outputs.latest_version_tag }}.
101-
101+
102102 **Changes made:**
103103 - Updated `CodeQLCLI` to `${{ steps.check-version.outputs.latest_version }}`
104104 - Updated `CodeQLStandardLibrary` to `codeql-cli/${{ steps.check-version.outputs.latest_version_tag }}`
0 commit comments