Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: put braces around variable references #143

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/update-v1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ darwin_sha="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
linux_sha="$(echo "$3" | tr "[:upper:]" "[:lower:]")"

# Replace version
sed -i "s/version \"[0-9.]*\"/version \"$version\"/g" "../Formula/[email protected]"
sed -i "s/version \"[0-9.]*\"/version \"${version}\"/g" "../Formula/[email protected]"

# Update macOS hash
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$darwin_sha\"/1" "../Formula/[email protected]"
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"${darwin_sha}\"/1" "../Formula/[email protected]"

# Update Linux hash
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$linux_sha\"/2" "../Formula/[email protected]"
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"${linux_sha}\"/2" "../Formula/[email protected]"
8 changes: 4 additions & 4 deletions scripts/update-v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ darwin_intel_sha="$(echo "$3" | tr "[:upper:]" "[:lower:]")"
linux_sha="$(echo "$4" | tr "[:upper:]" "[:lower:]")"

# Replace version
sed -i "s/version \"[0-9.]*\"/version \"$version\"/g" "../Formula/coder.rb"
sed -i "s/version \"[0-9.]*\"/version \"${version}\"/g" "../Formula/coder.rb"

# Update macOS ARM hash
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$darwin_arm_sha\"/1" "../Formula/coder.rb"
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"${darwin_arm_sha}\"/1" "../Formula/coder.rb"

# Update macOS Intel hash
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$darwin_intel_sha\"/2" "../Formula/coder.rb"
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"${darwin_intel_sha}\"/2" "../Formula/coder.rb"

# Update Linux hash
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$linux_sha\"/3" "../Formula/coder.rb"
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"${linux_sha}\"/3" "../Formula/coder.rb"
Loading