diff --git a/justfile b/justfile index b45d23c..d39ea39 100644 --- a/justfile +++ b/justfile @@ -65,9 +65,11 @@ release new_version: PREV=$(grep -m1 'MARKETING_VERSION' {{pbxproj}} | sed 's/.*= *//;s/;.*//') echo "Releasing $PREV -> $NEW" - # 1. Bump the version in the Xcode project. - sed -i '' "s/MARKETING_VERSION = [^;]*/MARKETING_VERSION = $NEW/" {{pbxproj}} - sed -i '' "s/CURRENT_PROJECT_VERSION = [^;]*/CURRENT_PROJECT_VERSION = $NEW/" {{pbxproj}} + # 1. Bump the version in the Xcode project. Use a backup suffix so the -i + # syntax works on both BSD sed (macOS) and GNU sed (nix dev shell). + sed -i.bak "s/MARKETING_VERSION = [^;]*/MARKETING_VERSION = $NEW/" {{pbxproj}} + sed -i.bak "s/CURRENT_PROJECT_VERSION = [^;]*/CURRENT_PROJECT_VERSION = $NEW/" {{pbxproj}} + rm -f {{pbxproj}}.bak # 2. Generate the changelog section for the new version from the conventional # commits since the last tag, prepending it under the header.