diff --git a/Cargo.toml b/Cargo.toml index 032b6b2..b37f671 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = ["crates/*"] default-members = ["crates/coop"] [workspace.package] -version = "1.0.0-beta" +version = "1.0.0-beta1" edition = "2021" publish = false diff --git a/crates/coop/Cargo.toml b/crates/coop/Cargo.toml index a28360d..4267a49 100644 --- a/crates/coop/Cargo.toml +++ b/crates/coop/Cargo.toml @@ -14,7 +14,7 @@ product-name = "Coop" description = "Chat Freely, Stay Private on Nostr" identifier = "su.reya.coop" category = "SocialNetworking" -version = "1.0.0-beta" +version = "1.0.0-beta1" out-dir = "../../dist" before-packaging-command = "cargo build --release" resources = ["Cargo.toml", "src"] diff --git a/script/release b/script/release index 9c38377..03c2ff1 100755 --- a/script/release +++ b/script/release @@ -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" }