Skip to content

Commit

Permalink
Fix homebrew script to update mvnd@1 formula
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Sep 11, 2024
1 parent 80e15db commit 8aaee77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build/publish-on-homebrew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ rm -Rf homebrew-mvnd
git clone https://github.com/mvndaemon/homebrew-mvnd.git
cd homebrew-mvnd

perl -i -0pe 's|(on_macos do[\s\S\n]+on_intel do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${darwinAmdZipUrl}'\"$3\"'${darwinAmdSha256}'\"|g' Formula/mvnd.rb
perl -i -0pe 's|(on_macos do[\s\S\n]+on_arm do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${darwinArmZipUrl}'\"$3\"'${darwinArmSha256}'\"|g' Formula/mvnd.rb
perl -i -0pe 's|(on_linux do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${linuxZipUrl}'\"$3\"'${linuxSha256}'\"|g' Formula/mvnd.rb
perl -i -0pe 's|(version )"([^\"]+)"|$1\"'${VERSION}'\"|g' Formula/mvnd.rb
perl -i -0pe 's|(on_macos do[\s\S\n]+on_intel do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${darwinAmdZipUrl}'\"$3\"'${darwinAmdSha256}'\"|g' 'Formula/mvnd@1.rb'
perl -i -0pe 's|(on_macos do[\s\S\n]+on_arm do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${darwinArmZipUrl}'\"$3\"'${darwinArmSha256}'\"|g' 'Formula/mvnd@1.rb'
perl -i -0pe 's|(on_linux do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${linuxZipUrl}'\"$3\"'${linuxSha256}'\"|g' 'Formula/mvnd@1.rb'
perl -i -0pe 's|(version )"([^\"]+)"|$1\"'${VERSION}'\"|g' 'Formula/mvnd@1.rb'

if [ -n "$(git status --porcelain)" ]; then
echo "Committing release ${VERSION}"
Expand Down

0 comments on commit 8aaee77

Please sign in to comment.