Skip to content

Commit b700d79

Browse files
committed
Address PR review comments
1 parent 3f9ca22 commit b700d79

4 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/code_scanning.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout repository
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131

3232
- name: Prepare local CodeQL model packs
3333
run: |
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Upload sarif change
9494
if: steps.validate.outcome != 'success'
95-
uses: actions/upload-artifact@v5
95+
uses: actions/upload-artifact@v6
9696
with:
9797
name: sarif
9898
path: |

.github/workflows/release-tag.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,10 @@ jobs:
167167
168168
# Stage version-bearing files and lockfile changes
169169
git add -A
170-
# Ensure CodeQL-generated artifacts are not staged for commit
170+
# Ensure generated artifacts (CodeQL, CAP compilation) are not staged for commit
171171
git restore --staged .codeql || true
172172
git restore --staged '*.qlx' || true
173+
git restore --staged 'javascript/frameworks/cap/test/**/model.cds.json' || true
173174
174175
# Check if there are changes to commit
175176
if git diff --cached --quiet; then

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,7 @@ dbs
7373
*.cds.json
7474
.cds-extractor-cache
7575

76+
# CodeQL-generated artifacts
77+
.codeql/
78+
*.qlx
79+

scripts/update-release-version.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ collect_versions() {
106106
if [[ -f "${full_path}" ]]; then
107107
local pack_version
108108
pack_version=$(grep -m1 "^version:" "${full_path}" | awk '{print $2}')
109+
if [[ -z "${pack_version}" ]]; then
110+
echo "ERROR: ${qlpack_file} is missing a 'version:' field" >&2
111+
return 1
112+
fi
109113
versions+=("${qlpack_file}|${pack_version}")
110114
else
111115
echo "WARNING: ${qlpack_file} not found" >&2
@@ -191,12 +195,16 @@ update_internal_deps() {
191195
local old_version="$2"
192196
local new_version="$3"
193197

198+
# Escape regex metacharacters in the old version (e.g., '.' -> '\.')
199+
local escaped_old_version
200+
escaped_old_version=$(printf '%s' "${old_version}" | sed 's/[.\*\[\^\$]/\\&/g')
201+
194202
for pack_name in "${INTERNAL_PACKS[@]}"; do
195203
# Update quoted caret-prefixed versions: "^X.Y.Z"
196-
sed -i.bak "s|${pack_name}: \"\\^${old_version}\"|${pack_name}: \"^${new_version}\"|g" "${file}"
204+
sed -i.bak "s|${pack_name}: \"\\^${escaped_old_version}\"|${pack_name}: \"^${new_version}\"|g" "${file}"
197205
rm -f "${file}.bak"
198206
# Update unquoted exact versions: X.Y.Z
199-
sed -i.bak "s|${pack_name}: ${old_version}$|${pack_name}: ${new_version}|g" "${file}"
207+
sed -i.bak "s|${pack_name}: ${escaped_old_version}$|${pack_name}: ${new_version}|g" "${file}"
200208
rm -f "${file}.bak"
201209
done
202210
}

0 commit comments

Comments
 (0)