Skip to content

Commit

Permalink
Fix update.sh for use on BSD/Darwin
Browse files Browse the repository at this point in the history
BSD vs. GNU sed have incompatible argument syntax for editing files
in-place.
We now simply use good old perl, instead of ugly workarounds.
  • Loading branch information
pabzm committed Nov 20, 2024
1 parent 2dc9b95 commit a8d1c59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ for variant in apache fpm fpm-alpine; do
echo "✓ Wrote $dir/Dockerfile"
done

sed -i -E "s/1\.[0-9]\.[0-9]+-/${VERSION}-/" .github/workflows/build.yml
# Use perl to avoid problems with BSD vs. GNU sed, which have incompatible
# argument syntax for editing files in-place.
perl -pi -e "s/1\.[0-9]\.[0-9]+-/${VERSION}-/" .github/workflows/build.yml
echo "Updating version in build.yml workflow"

echo "Done."

0 comments on commit a8d1c59

Please sign in to comment.