Skip to content

Commit f96ca31

Browse files
committed
Change folder name and replaced sed by yq
1 parent a0a47fe commit f96ca31

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.github/workflows/sdlc-sdk-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
_SDK_PACKAGE: ${{ inputs.sdk-package }}
8989
_SDK_VERSION: ${{ inputs.sdk-version }}
9090
run: |
91-
./scripts/update-sdk-version.sh "$_SDK_PACKAGE" "$_SDK_VERSION"
91+
./Scripts/update-sdk-version.sh "$_SDK_PACKAGE" "$_SDK_VERSION"
9292
9393
- name: Create branch and commit
9494
env:

Scripts/update-sdk-version.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Script to update SDK version in project-bwa.yml, project-bwk.yml and project-pm.ym
3+
# Script to update SDK version in project-bwa.yml, project-bwk.yml and project-pm.yml
44
# Usage: ./Scripts/update-sdk-version.sh <sdk-package> <sdk-version>
55
# ./Scripts/update-sdk-version.sh BitwardenSdk 2a6609428275c758fcda5383bfb6b3166ec29eda
66

@@ -23,11 +23,7 @@ FILES=(
2323
for file in "${FILES[@]}"; do
2424
if [[ -f "$file" ]]; then
2525
echo "🔧 Updating revision in $file..."
26-
sed -i.bak -E "/^packages:/,/^[^[:space:]]/ {
27-
/$SDK_PACKAGE:/,/^[[:space:]]{2}[[:alnum:]]/ {
28-
s/^([[:space:]]{4}revision: ).*/\1$SDK_VERSION/
29-
}
30-
}" "$file"
26+
yq -i ".packages[\"$SDK_PACKAGE\"].revision = \"$SDK_VERSION\"" "$file"
3127
echo "✅ Updated revision line:"
3228
grep "revision:" "$file"
3329
else

0 commit comments

Comments
 (0)