mirror of
https://codeberg.org/secana/Forji.git
synced 2026-06-16 05:13:55 -07:00
ci: make release recipe sed portable across BSD and GNU sed (#83)
`just release` used `sed -i ''`, which is BSD/macOS syntax. In the nix dev shell GNU sed shadows it and reads `''` as an empty script and the s/.../ expression as a filename, aborting the version bump. Use `-i.bak` plus a cleanup `rm`, which works on both BSD and GNU sed. Reviewed-on: https://codeberg.org/secana/Forji/pulls/83
This commit is contained in:
parent
e36150a2fc
commit
a8ce9d1180
1 changed files with 5 additions and 3 deletions
8
justfile
8
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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue