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
Show file tree
Hide file tree
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
Next Next commit
coder@1: rename legacy formulas
  • Loading branch information
aslilac committed Aug 28, 2023
commit a10fe0cb6f33c2059f39adb07d36b4c167751cd0
12 changes: 6 additions & 6 deletions ci/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ darwin_sha="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
linux_sha="$(echo "$3" | tr "[:upper:]" "[:lower:]")"

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

# Replace version
sed -i "s/${old_version//./\.}/${version//./\.}/g" ../coder-cli{,-nightly}.rb
sed -i '' "s/${old_version//./\.}/${version//./\.}/g" "../coder@1.rb"

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

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

This file was deleted.

12 changes: 6 additions & 6 deletions coder-cli.rb → coder@1.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
class CoderCli < Formula
class CoderAT1 < Formula
desc "Command-line tool for the Coder remote development platform"
homepage "https://github.com/cdr/coder-cli"
homepage "https://github.com/coder/coder-v1-cli"
version "1.44.0"

if OS.mac?
url "https://github.com/cdr/coder-cli/releases/download/v1.44.0/coder-cli-darwin-amd64.zip"
sha256 "f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693"
url "https://github.com/coder/coder-v1-cli/releases/download/v1.44.0/coder-cli-darwin-amd64.zip"
sha256 "f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693" # mac
else
url "https://github.com/cdr/coder-cli/releases/download/v1.44.0/coder-cli-linux-amd64.tar.gz"
sha256 "642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9"
url "https://github.com/coder/coder-v1-cli/releases/download/v1.44.0/coder-cli-linux-amd64.tar.gz"
sha256 "642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9" # linux
end

def install
Expand Down
4 changes: 4 additions & 0 deletions formula_renames.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"coder-cli-nightly": "coder@1",
"coder-cli": "coder@1"
}