Skip to content

Commit a10fe0c

Browse files
committed
coder@1: rename legacy formulas
1 parent d422c68 commit a10fe0c

File tree

4 files changed

+16
-32
lines changed

4 files changed

+16
-32
lines changed

ci/update.sh

+6-6
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-cli.rb)"
15+
old_version="$(sed -n "s/.*version \"\(.*\)\".*/\1/p" "../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-cli{,-nightly}.rb
22+
sed -i '' "s/${old_version//./\.}/${version//./\.}/g" "../coder@1.rb"
2323

24-
# Darwin amd64 SHA256. This only selects the first match
25-
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$darwin_sha\"/1" ../coder-cli{,-nightly}.rb
24+
# Update macOS hash
25+
sed -i '' "s/sha256 \"[a-f0-9]*\" # mac/sha256 \"$darwin_sha\" # mac/" "../coder@1.rb"
2626

27-
# Linux amd64 SHA256. This only selects the second match
28-
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$linux_sha\"/2" ../coder-cli{,-nightly}.rb
27+
# Update Linux hash
28+
sed -i '' "s/sha256 \"[a-f0-9]*\" # linux/sha256 \"$linux_sha\" # linux/" "../coder@1.rb"

coder-cli-nightly.rb

-20
This file was deleted.

coder-cli.rb renamed to coder@1.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
class CoderCli < Formula
1+
class CoderAT1 < Formula
22
desc "Command-line tool for the Coder remote development platform"
3-
homepage "https://github.com/cdr/coder-cli"
3+
homepage "https://github.com/coder/coder-v1-cli"
44
version "1.44.0"
55

66
if OS.mac?
7-
url "https://github.com/cdr/coder-cli/releases/download/v1.44.0/coder-cli-darwin-amd64.zip"
8-
sha256 "f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693"
7+
url "https://github.com/coder/coder-v1-cli/releases/download/v1.44.0/coder-cli-darwin-amd64.zip"
8+
sha256 "f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693" # mac
99
else
10-
url "https://github.com/cdr/coder-cli/releases/download/v1.44.0/coder-cli-linux-amd64.tar.gz"
11-
sha256 "642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9"
10+
url "https://github.com/coder/coder-v1-cli/releases/download/v1.44.0/coder-cli-linux-amd64.tar.gz"
11+
sha256 "642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9" # linux
1212
end
1313

1414
def install

formula_renames.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"coder-cli-nightly": "coder@1",
3+
"coder-cli": "coder@1"
4+
}

0 commit comments

Comments
 (0)