From ed72de952aeaa835fb27715180c9ee936208fc7b Mon Sep 17 00:00:00 2001 From: Ethan Hindmarsh Loves Veilid Date: Sun, 2 Jun 2024 14:03:10 -0500 Subject: [PATCH] darwin-specific sed --- version_bump.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/version_bump.sh b/version_bump.sh index 5ada2c3..cd17b37 100755 --- a/version_bump.sh +++ b/version_bump.sh @@ -34,7 +34,13 @@ get_current_version() { # Function to update the version in pubspec.yaml update_version() { local new_version=$1 - sed -i "s/version: .*/version: ${new_version}/" pubspec.yaml + + if [[ "$OSTYPE" == "darwin"* ]]; then + SED_CMD="sed -i ''" + else + SED_CMD="sed -i" + fi + eval "$SED_CMD 's/version: .*/version: ${new_version}/' pubspec.yaml" } # I pray none of this errors! - I think it should popup an error should that happen..