chore: release version 1.0.0-beta1
This commit is contained in:
@@ -34,13 +34,9 @@ update_version() {
|
||||
# Backup the original file
|
||||
cp "$file" "$backup"
|
||||
|
||||
# Replace the version in Cargo.toml
|
||||
if sed -i.bak -E "s/^version = \"[0-9]+\.[0-9]+\.[0-9]+\"/version = \"$NEW_VERSION\"/" "$file"; then
|
||||
# More flexible regex that handles various version formats and whitespace
|
||||
if sed -i -E "s/^[[:space:]]*version[[:space:]]*=[[:space:]]*\"[^\"]+\"/version = \"$NEW_VERSION\"/" "$file"; then
|
||||
echo "✓ Updated version to $NEW_VERSION in $file"
|
||||
# Remove backup created by sed
|
||||
if [ -f "${file}.bak" ]; then
|
||||
rm "${file}.bak"
|
||||
fi
|
||||
else
|
||||
echo "Error: Failed to update version in $file"
|
||||
# Restore original backup
|
||||
@@ -48,7 +44,7 @@ update_version() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Remove the initial backup file
|
||||
# Remove the backup file
|
||||
rm -f "$backup"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user