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)
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user