This repository was archived by the owner on Aug 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 97
97
asset_path : coder-cli-windows-386/coder-cli-windows-386.zip
98
98
asset_name : coder-cli-windows-386.zip
99
99
asset_content_type : application/zip
100
+ - name : Open PR to cdr/homebrew-coder
101
+ run : ./ci/scripts/update_homebrew.sh $(pwd)/coder-cli-darwin-amd64/coder-cli-darwin-amd64.zip
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ asset=" $1 "
6
+ sha=" $( sha256sum " $asset " | awk ' { print $1 }' ) "
7
+ tag=" $( git describe --tags) "
8
+
9
+ tmpdir=$( mktemp -d)
10
+
11
+ pushd " $tmpdir "
12
+ git clone https://github.com/cdr/homebrew-coder
13
+
14
+ pushd homebrew-coder
15
+
16
+ branch=" coder-cli-release-$tag "
17
+ git checkout -b " $branch "
18
+
19
+ new_formula=" $( cat << EOF
20
+ class Coder < Formula
21
+ desc "A command-line tool for the Coder remote development platform"
22
+ homepage "https://github.com/cdr/coder-cli"
23
+ url "https://github.com/cdr/coder-cli/releases/download/$tag /coder-cli-darwin-amd64.zip"
24
+ version "$tag "
25
+ sha256 "$sha "
26
+ bottle :unneeded
27
+ def install
28
+ bin.install "coder"
29
+ end
30
+ test do
31
+ system "#{bin}/coder", "--version"
32
+ end
33
+ end
34
+ EOF
35
+ ) "
36
+
37
+ echo " $new_formula " > coder.rb
38
+
39
+ git add coder.rb
40
+ git commit -m " chore: update Coder CLI to $tag "
41
+ git push --set-upstream origin " $branch "
42
+
43
+ gh pr create --fill
44
+
45
+ rm -rf " $tmpdir "
You can’t perform that action at this time.
0 commit comments