@@ -27,7 +27,6 @@ set -euo pipefail
2727# # that reference other packs in this repository (e.g., ^X.Y.Z constraints).
2828# # - qlt.conf.json (CodeQLCLI, CodeQLStandardLibrary, CodeQLCLIBundle)
2929# # using the base version (X.Y.Z) derived by stripping any pre-release suffix.
30- # # - .codeql-version (vX.Y.Z, kept in sync with qlt.conf.json CodeQLCLI)
3130# #
3231# # Usage:
3332# # ./scripts/update-release-version.sh <new-version>
@@ -183,24 +182,8 @@ check_versions() {
183182 fi
184183 fi
185184
186- # # Also check .codeql-version consistency (must match qlt.conf.json CodeQLCLI with v prefix)
187- local codeql_version_file=" ${REPO_ROOT} /.codeql-version"
188- if [[ -f " ${codeql_version_file} " ]]; then
189- local codeql_file_version
190- codeql_file_version=$( tr -d ' [:space:]' < " ${codeql_version_file} " )
191- local check_base=" ${expected_version:- ${first_version} } "
192- check_base=" ${check_base%% -* } "
193- local expected_codeql_version=" v${check_base} "
194- if [[ " ${codeql_file_version} " == " ${expected_codeql_version} " ]]; then
195- echo " ✅ .codeql-version: ${codeql_file_version} "
196- else
197- echo " ❌ .codeql-version: ${codeql_file_version} (expected ${expected_codeql_version} )"
198- all_consistent=false
199- fi
200- fi
201-
202185 echo " "
203- echo " Checked ${file_count} version-bearing files + qlt.conf.json + .codeql-version ."
186+ echo " Checked ${file_count} version-bearing files + qlt.conf.json."
204187
205188 if [[ " ${all_consistent} " == true ]]; then
206189 if [[ -n " ${expected_version} " ]]; then
@@ -274,30 +257,6 @@ update_qlt_config() {
274257 echo " ✅ qlt.conf.json: CodeQLCLI -> ${base_version} "
275258}
276259
277- # # Update .codeql-version file (kept in sync with qlt.conf.json CodeQLCLI)
278- # # The file contains the version with a 'v' prefix, e.g. v2.25.0
279- update_codeql_version_file () {
280- local new_version=" $1 "
281- local dry_run=" ${2:- false} "
282- local codeql_version_file=" ${REPO_ROOT} /.codeql-version"
283-
284- # Derive the base version by stripping any pre-release suffix
285- local base_version=" ${new_version%% -* } "
286-
287- if [[ ! -f " ${codeql_version_file} " ]]; then
288- echo " WARNING: .codeql-version not found, skipping" >&2
289- return 0
290- fi
291-
292- if [[ " ${dry_run} " == true ]]; then
293- echo " [DRY RUN] .codeql-version: -> v${base_version} "
294- return 0
295- fi
296-
297- printf ' v%s\n' " ${base_version} " > " ${codeql_version_file} "
298- echo " ✅ .codeql-version: -> v${base_version} "
299- }
300-
301260# # Update internal dependency references in a qlpack.yml file
302261# # e.g., advanced-security/javascript-sap-cap-models: "^2.3.0" -> "^2.4.0"
303262# # e.g., advanced-security/javascript-sap-cap-models: "^2.3.0" -> "^2.4.0-alpha"
@@ -368,15 +327,14 @@ update_versions() {
368327 fi
369328 done
370329
371- # # Update qlt.conf.json and .codeql-version
330+ # # Update qlt.conf.json
372331 update_qlt_config " ${new_version} " " ${dry_run} "
373- update_codeql_version_file " ${new_version} " " ${dry_run} "
374332
375333 echo " "
376334 if [[ " ${dry_run} " == true ]]; then
377- echo " Would update ${updated_count} qlpack files + qlt.conf.json + .codeql-version . (Dry run — no files modified)"
335+ echo " Would update ${updated_count} qlpack files + qlt.conf.json. (Dry run — no files modified)"
378336 else
379- echo " Updated ${updated_count} qlpack files + qlt.conf.json + .codeql-version to version ${new_version} ."
337+ echo " Updated ${updated_count} qlpack files + qlt.conf.json to version ${new_version} ."
380338 echo " "
381339 echo " Next steps:"
382340 echo " 1. Run 'codeql pack upgrade' on all packs to update lock files"
0 commit comments