Skip to content

Commit 4a975c9

Browse files
committed
fix: update sed commands in Homebrew formula to use alternate delimiter
1 parent 6c9194b commit 4a975c9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/build-and-upload-binaries.sh

100755100644
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ update_homebrew_formula() {
183183
fi
184184

185185
# Update version
186-
sed -i.bak "s/version \"[0-9.]*\"/version \"$version\"/" "$formula_path"
186+
sed -i.bak "s|version \"[0-9.]*\"|version \"$version\"|g" "$formula_path"
187187

188188
# Update x86_64 SHA256
189-
sed -i.bak "s/sha256 \"[a-f0-9]*\"/sha256 \"$x86_64_sha256\"/" "$formula_path"
189+
sed -i.bak "s|sha256 \"[a-f0-9]*\"|sha256 \"$x86_64_sha256\"|g" "$formula_path"
190190

191191
# Update aarch64 SHA256 (find the line with aarch64 and update the SHA256 on the next line)
192-
sed -i.bak "/aarch64-apple-darwin/,+1{s/sha256 \"[a-f0-9]*\"/sha256 \"$aarch64_sha256\"/}" "$formula_path"
192+
sed -i.bak "/aarch64-apple-darwin/,+1{s|sha256 \"[a-f0-9]*\"|sha256 \"$aarch64_sha256\"|g};" "$formula_path"
193193

194194
# Clean up backup files
195195
rm "$formula_path.bak"
@@ -278,4 +278,4 @@ main() {
278278
}
279279

280280
# Run main function
281-
main "$@"
281+
main "$@"

0 commit comments

Comments
 (0)