From 16142037866cf5309bb79bde4fa023a0cd02564e Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Thu, 24 Jul 2025 14:13:31 -0700 Subject: [PATCH] fix: make bump_version.sh work on both macOS and Linux - macOS uses sed -i '' while Linux uses sed -i - Add OS detection to use correct syntax - Ensures script works in CI (Linux) and local dev (macOS) --- scripts/bump_version.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/bump_version.sh b/scripts/bump_version.sh index 0e831e9..20b7e56 100755 --- a/scripts/bump_version.sh +++ b/scripts/bump_version.sh @@ -8,6 +8,11 @@ fi NEW_VERSION=$1 # Update all pyproject.toml files -sed -i '' "s/version = \".*\"/version = \"$NEW_VERSION\"/" packages/*/pyproject.toml +# Use different sed syntax for macOS vs Linux +if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' "s/version = \".*\"/version = \"$NEW_VERSION\"/" packages/*/pyproject.toml +else + sed -i "s/version = \".*\"/version = \"$NEW_VERSION\"/" packages/*/pyproject.toml +fi echo "Version updated to $NEW_VERSION" \ No newline at end of file