File tree 10 files changed +147
-90
lines changed
10 files changed +147
-90
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
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'
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change 1
- class CoderCli < Formula
1
+ class CoderAT1 < Formula
2
2
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"
4
4
version "1.44.0"
5
5
6
6
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"
8
8
sha256 "f3fe13cec4d0615a40134675279d4cd1a5a871356d90dedef020981622f1b693"
9
9
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"
11
11
sha256 "642320e709a8585ae732e3b31d5945a09cd2a7d63121d7121c34ebc5740d3fc9"
12
12
end
13
13
14
+ keg_only :versioned_formula
15
+
16
+ def version_suffix
17
+ version . major . to_s
18
+ end
19
+
14
20
def install
15
21
bin . install "coder"
16
22
end
23
+
17
24
test do
18
25
system "#{ bin } /coder" , "--version"
19
26
end
Original file line number Diff line number Diff line change 1
1
# Coder Homebrew Tap
2
2
3
- A Homebrew Tap for Coder related utilities and applications.
3
+ Provides official formulae for [ Coder] products
4
4
5
5
## Usage
6
6
7
- ``` text
8
- brew tap coder/coder
7
+ #### Install [ Coder]
8
+
9
+ ``` sh
10
+ brew install coder/coder/coder
9
11
```
10
12
11
- ### Install the [ Coder CLI ] ( https://github.com/cdr/coder-cli )
13
+ #### Install Coder v1 (legacy )
12
14
13
- ``` text
14
- brew install coder-cli
15
+ ``` sh
16
+ brew install coder/coder/coder@v1
15
17
```
18
+
19
+ [ coder ] : https://github.com/coder/coder
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {
2
+ "coder-cli-nightly" : " coder@1" ,
3
+ "coder-cli" : " coder@1"
4
+ }
Original file line number Diff line number Diff line change
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"
Original file line number Diff line number Diff line change
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"
You can’t perform that action at this time.
0 commit comments