Skip to content

Commit b8c3f17

Browse files
data-douserCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent adddbc5 commit b8c3f17

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

.github/workflows/release-codeql.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,22 +124,25 @@ jobs:
124124
run: echo "⏭️ CodeQL pack publishing disabled via workflow input"
125125

126126
- name: CodeQL - Bundle CodeQL packs
127+
env:
128+
PUBLISHABLE_PACKS_LIST: |
129+
javascript/frameworks/cap/src
130+
javascript/frameworks/cap/ext
131+
javascript/frameworks/cap/lib
132+
javascript/frameworks/ui5/src
133+
javascript/frameworks/ui5/ext
134+
javascript/frameworks/ui5/lib
135+
javascript/frameworks/xsjs/src
136+
javascript/frameworks/xsjs/ext
137+
javascript/frameworks/xsjs/lib
138+
javascript/heuristic-models/ext
127139
run: |
128140
mkdir -p dist-packs
129141
130142
# Bundle all publishable packs
131-
PUBLISHABLE_PACKS=(
132-
"javascript/frameworks/cap/src"
133-
"javascript/frameworks/cap/ext"
134-
"javascript/frameworks/cap/lib"
135-
"javascript/frameworks/ui5/src"
136-
"javascript/frameworks/ui5/ext"
137-
"javascript/frameworks/ui5/lib"
138-
"javascript/frameworks/xsjs/src"
139-
"javascript/frameworks/xsjs/ext"
140-
"javascript/frameworks/xsjs/lib"
141-
"javascript/heuristic-models/ext"
142-
)
143+
# Read the pack list from the environment into a Bash array.
144+
# Each line in PUBLISHABLE_PACKS_LIST becomes one element.
145+
mapfile -t PUBLISHABLE_PACKS <<< "${PUBLISHABLE_PACKS_LIST}"
143146
144147
echo "Bundling CodeQL packs..."
145148
for pack_dir in "${PUBLISHABLE_PACKS[@]}"; do

scripts/update-release-version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ update_internal_deps() {
195195
local old_version="$2"
196196
local new_version="$3"
197197

198-
# Escape regex metacharacters in the old version (e.g., '.' -> '\.')
198+
# Escape dots in the old version (e.g., '2.3.0' -> '2\.3\.0') for use in sed regex
199199
local escaped_old_version
200-
escaped_old_version=$(printf '%s' "${old_version}" | sed 's/[.\*\[\^\$]/\\&/g')
200+
escaped_old_version=$(printf '%s' "${old_version}" | sed 's/\./\\./g')
201201

202202
for pack_name in "${INTERNAL_PACKS[@]}"; do
203203
# Update quoted caret-prefixed versions: "^X.Y.Z"

0 commit comments

Comments
 (0)