Skip to content

coder 2.1.4 #97

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

Merged
merged 11 commits into from
Aug 29, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add v2 update script
  • Loading branch information
aslilac committed Aug 29, 2023
commit f10257d4c473f452a1cdecee38dd123cddf6f0a9
25 changes: 25 additions & 0 deletions ci/update-v2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Updates both the coder-cli and coder-cli-nightly formulae to have the given
# values.
# ./update.sh "<version>" "<darwin-arm64-zip-SHA256>" "<darwin-amd64-zip-SHA256>" "<linux-amd64-targz-SHA256>"

set -euo pipefail
cd "$(dirname "$0")"

version="$1"
darwin_arm_sha="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
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"

# Update macOS ARM hash
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"

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