Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3ff2274

Browse files
authored
coder 2.1.4
1 parent d422c68 commit 3ff2274

File tree

10 files changed

+147
-90
lines changed

10 files changed

+147
-90
lines changed

‎.github/workflows/test.yaml‎

Lines changed: 0 additions & 32 deletions
This file was deleted.

‎.github/workflows/test.yml‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12+
13+
jobs:
14+
test:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-22.04, macos-13]
19+
20+
runs-on: ${{ matrix.os }}
21+
22+
steps:
23+
- name: Set up Homebrew
24+
id: set-up-homebrew
25+
uses: Homebrew/actions/setup-homebrew@master
26+
27+
- name: Cache Homebrew Bundler RubyGems
28+
id: cache
29+
uses: actions/cache@v3
30+
with:
31+
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
32+
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
33+
restore-keys: ${{ runner.os }}-rubygems-
34+
35+
- name: Install Homebrew Bundler RubyGems
36+
if: steps.cache.outputs.cache-hit != 'true'
37+
run: brew install-bundler-gems
38+
39+
- run: brew test-bot --only-cleanup-before
40+
41+
- run: brew test-bot --only-setup
42+
43+
- run: brew test-bot --only-tap-syntax
44+
45+
- run: brew test-bot --only-formulae
46+
if: github.event_name == 'pull_request'

‎Formula/coder.rb‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
class Coder < Formula
2+
desc "Provisions remote development environments via Terraform"
3+
homepage "https://github.com/coder/coder"
4+
version "2.1.4"
5+
6+
if OS.mac?
7+
if Hardware::CPU.arm?
8+
url "https://github.com/coder/coder/releases/download/v#{version}/coder_#{version}_darwin_arm64.zip"
9+
sha256 "ac67c032e81fed7ef3b2e1fc5bfafb878e7551c081d0a136f5a88583c279c060"
10+
else
11+
url "https://github.com/coder/coder/releases/download/v#{version}/coder_#{version}_darwin_amd64.zip"
12+
sha256 "693d6c450891627d879123ea9a08dc5917dafee7de6c639c5c9b496abe6f250b"
13+
end
14+
else
15+
url "https://github.com/coder/coder/releases/download/v#{version}/coder_#{version}_linux_amd64.tar.gz"
16+
sha256 "41666bbe3afacd153fbe6c1a2d908bb4fb7a88e821205cb7136a0bad2d1cd6dc"
17+
end
18+
19+
def install
20+
bin.install "coder"
21+
end
22+
23+
test do
24+
version_output = shell_output("#{bin}/coder version")
25+
assert_match version.to_s, version_output
26+
refute_match "AGPL", version_output
27+
assert_match "Full build", version_output
28+
29+
assert_match "You are not logged in", shell_output("#{bin}/coder netcheck 2>&1", 1)
30+
assert_match "postgres://", shell_output("#{bin}/coder server postgres-builtin-url")
31+
end
32+
end

‎coder-cli.rb‎ renamed to ‎Formula/coder@1.rb‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
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"
7+
url "https://github.com/coder/coder-v1-cli/releases/download/v#{version}/coder-cli-darwin-amd64.zip"
88
sha256 "f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693"
99
else
10-
url "https://github.com/cdr/coder-cli/releases/download/v1.44.0/coder-cli-linux-amd64.tar.gz"
10+
url "https://github.com/coder/coder-v1-cli/releases/download/v#{version}/coder-cli-linux-amd64.tar.gz"
1111
sha256 "642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9"
1212
end
1313

14+
keg_only :versioned_formula
15+
16+
def version_suffix
17+
version.major.to_s
18+
end
19+
1420
def install
1521
bin.install "coder"
1622
end
23+
1724
test do
1825
system "#{bin}/coder", "--version"
1926
end

‎README.md‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# Coder Homebrew Tap
22

3-
A Homebrew Tap for Coder related utilities and applications.
3+
Provides official formulae for [Coder] products
44

55
## Usage
66

7-
```text
8-
brew tap coder/coder
7+
#### Install [Coder]
8+
9+
```sh
10+
brew install coder/coder/coder
911
```
1012

11-
### Install the [Coder CLI](https://github.com/cdr/coder-cli)
13+
#### Install Coder v1 (legacy)
1214

13-
```text
14-
brew install coder-cli
15+
```sh
16+
brew install coder/coder/coder@v1
1517
```
18+
19+
[coder]: https://github.com/coder/coder

‎ci/update.sh‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎coder-cli-nightly.rb‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎formula_renames.json‎

Lines changed: 4 additions & 0 deletions
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+
}

‎scripts/update-v1.sh‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Updates the coder@1 formula
4+
# ./update.sh "<version>" "<darwin-amd64-zip-SHA256>" "<linux-amd64-targz-SHA256>"
5+
6+
set -euo pipefail
7+
cd "$(dirname "0ドル")"
8+
9+
version="1ドル"
10+
darwin_sha="$(echo "2ドル" | tr "[:upper:]" "[:lower:]")"
11+
linux_sha="$(echo "3ドル" | tr "[:upper:]" "[:lower:]")"
12+
13+
# Replace version
14+
sed -i "s/version \"[0-9.]*\"/version \"$version\"/g" "../Formula/coder@1.rb"
15+
16+
# Update macOS hash
17+
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$darwin_sha\"/1" "../Formula/coder@1.rb"
18+
19+
# Update Linux hash
20+
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$linux_sha\"/2" "../Formula/coder@1.rb"

‎scripts/update-v2.sh‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Updates the coder formula
4+
# ./update.sh "<version>" "<darwin-arm64-zip-SHA256>" "<darwin-amd64-zip-SHA256>" "<linux-amd64-targz-SHA256>"
5+
6+
set -euo pipefail
7+
cd "$(dirname "0ドル")"
8+
9+
version="1ドル"
10+
darwin_arm_sha="$(echo "2ドル" | tr "[:upper:]" "[:lower:]")"
11+
darwin_intel_sha="$(echo "3ドル" | tr "[:upper:]" "[:lower:]")"
12+
linux_sha="$(echo "4ドル" | tr "[:upper:]" "[:lower:]")"
13+
14+
# Replace version
15+
sed -i "s/version \"[0-9.]*\"/version \"$version\"/g" "../Formula/coder.rb"
16+
17+
# Update macOS ARM hash
18+
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$darwin_arm_sha\"/1" "../Formula/coder.rb"
19+
20+
# Update macOS Intel hash
21+
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$darwin_intel_sha\"/2" "../Formula/coder.rb"
22+
23+
# Update Linux hash
24+
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$linux_sha\"/3" "../Formula/coder.rb"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /