Skip to content

Commit 41fa32a

Browse files
committed
ah, gnu-sed
1 parent ccbae36 commit 41fa32a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Formula/coder@1.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ class CoderAT1 < Formula
55

66
if OS.mac?
77
url "https://github.com/coder/coder-v1-cli/releases/download/v#{version}/coder-cli-darwin-amd64.zip"
8-
sha256 "f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693" # mac
8+
sha256 "f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693"
99
else
1010
url "https://github.com/coder/coder-v1-cli/releases/download/v#{version}/coder-cli-linux-amd64.tar.gz"
11-
sha256 "642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9" # linux
11+
sha256 "642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9"
1212
end
1313

1414
keg_only :versioned_formula

ci/update.sh renamed to ci/update-v1.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ darwin_sha="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
1212
linux_sha="$(echo "$3" | tr "[:upper:]" "[:lower:]")"
1313

1414
# Get the old version to use in our find/replace.
15-
old_version="$(sed -n "s/.*version \"\(.*\)\".*/\1/p" "../coder@1.rb")"
15+
old_version="$(sed -n "s/.*version \"\(.*\)\".*/\1/p" "../Formula/coder@1.rb")"
1616
if [[ "$old_version" == "" ]]; then
1717
echo "Could not determine the old version of the formula..." >&2
1818
exit 1
1919
fi
2020

2121
# Replace version
22-
sed -i '' "s/${old_version//./\.}/${version//./\.}/g" "../coder@1.rb"
22+
sed -i "s/${old_version//./\.}/${version//./\.}/g" "../Formula/coder@1.rb"
2323

2424
# Update macOS hash
25-
sed -i '' "s/sha256 \"[a-f0-9]*\" # mac/sha256 \"$darwin_sha\" # mac/" "../coder@1.rb"
25+
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$darwin_sha\"/1" "../Formula/coder@1.rb"
2626

2727
# Update Linux hash
28-
sed -i '' "s/sha256 \"[a-f0-9]*\" # linux/sha256 \"$linux_sha\" # linux/" "../coder@1.rb"
28+
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$linux_sha\"/2" "../Formula/coder@1.rb"

0 commit comments

Comments
 (0)