Skip to content

Commit ee96edf

Browse files
authored
fix meson inclusion probably.
1 parent f897e61 commit ee96edf

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/update-project-version.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
SOVER="${{ github.event.inputs.target_soversion }}"
2828
echo "bumping version to $VER"
2929
30-
# 1. cmakelists.txt
30+
# 1. cmakelists.txt: surgical update inside project() block
3131
if [ -f CMakeLists.txt ]; then
3232
echo "updating cmakelists.txt"
3333
sed -i "/project[[:space:]]*([[:space:]]*jsoncpp/,/)/ s/VERSION [0-9.]*/VERSION $VER/" CMakeLists.txt
@@ -36,16 +36,18 @@ jobs:
3636
fi
3737
fi
3838
39-
# 2. meson.build
39+
# 2. meson.build: targeting keys directly (safer for multi-line)
4040
if [ -f meson.build ]; then
4141
echo "updating meson.build"
42-
sed -i "/project('jsoncpp'/,/)/ s/version[[:space:]]*:[[:space:]]*['\"][0-9.]*['\"]/version : '$VER'/" meson.build
42+
# matches 'version : '1.9.6''
43+
sed -i "s/version[[:space:]]*:[[:space:]]*['][0-9.]*[']/version : '$VER'/" meson.build
4344
if [ -n "$SOVER" ]; then
44-
sed -i "s/soversion[[:space:]]*:[[:space:]]*['\"][0-9]*['\"]/soversion : '$SOVER'/" meson.build
45+
# matches 'soversion : '26''
46+
sed -i "s/soversion[[:space:]]*:[[:space:]]*['][0-9]*[']/soversion : '$SOVER'/" meson.build
4547
fi
4648
fi
4749
48-
# 3. module.bazel
50+
# 3. module.bazel: surgical update inside module() block
4951
if [ -f MODULE.bazel ]; then
5052
echo "updating module.bazel"
5153
sed -i "/module(/,/)/ s/version[[:space:]]*=[[:space:]]*['\"][0-9.]*['\"]/version = \"$VER\"/" MODULE.bazel

0 commit comments

Comments
 (0)