Skip to content

Commit

Permalink
set-c-version-sh: support replacing version with suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
greenrobot-team committed May 15, 2024
1 parent f2fef12 commit 48ae096
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tool/set-c-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@

if [[ "$#" -ne "1" ]]; then
echo "usage: $0 <version>"
echo "e.g. $0 0.20.0"
echo "e.g. $0 0.21.1-alpha1"
exit 1
fi

version=$1

echo "Setting cLibVersion and OBJECTBOX_VERSION version: $version"

versionExpr="s/cLibVersion=[0-9]\+\.[0-9]\+\.[0-9]\+/cLibVersion=${version}/g"
# Version like 0.1.2 or 0.1.2-alpha1
versionExpr="s/cLibVersion=[0-9]\+\.[0-9]\+\.[0-9]\+[0-9a-zA-Z-]*/cLibVersion=${version}/g"
update install.sh "${versionExpr}"
update tool/update-c-binding.sh "${versionExpr}"

versionExpr="s/OBJECTBOX_VERSION [0-9]\+\.[0-9]\+\.[0-9]\+/OBJECTBOX_VERSION ${version}/g"
versionExpr="s/OBJECTBOX_VERSION [0-9]\+\.[0-9]\+\.[0-9]\+[0-9a-zA-Z-]*/OBJECTBOX_VERSION ${version}/g"
update flutter_libs/linux/CMakeLists.txt "${versionExpr}"
update flutter_libs/windows/CMakeLists.txt "${versionExpr}"
update sync_flutter_libs/linux/CMakeLists.txt "${versionExpr}"
Expand Down

0 comments on commit 48ae096

Please sign in to comment.