This repository was archived by the owner on Aug 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change
1
+ class Cordless < Formula
2
+ desc "Discord, but in 1984"
3
+ homepage "https://github.com/Bios-Marcel/cordless"
4
+ url "https://github.com/Bios-Marcel/cordless/archive/$RELEASE_DATE.tar.gz"
5
+ version "$RELEASE_DATE"
6
+ sha256 "$TAR_HASH"
7
+ head "https://github.com/Bios-Marcel/cordless.git"
8
+
9
+ depends_on "go" => :build
10
+ depends_on "pngpaste" => :recommended
11
+
12
+ def install
13
+ ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache"
14
+ (buildpath/"src/github.com/Bios-Marcel/cordless").install buildpath.children
15
+ cd "src/github.com/Bios-Marcel/cordless" do
16
+ system "go", "build", "-o", bin/"cordless"
17
+ prefix.install_metafiles
18
+ end
19
+ end
20
+
21
+ test do
22
+ system "true"
23
+ end
24
+ end
25
+
Original file line number Diff line number Diff line change @@ -128,10 +128,22 @@ else
128
128
hub release create -a " $BIN_LINUX " -a " $BIN_DARWIN " -a " $BIN_WINDOWS " -m " ${RELEASE_DATE} " -m " ${RELEASE_BODY} " " $RELEASE_DATE "
129
129
fi
130
130
131
+ #
132
+ # Substitutes the manifest template for the homebrew package. We need to
133
+ # download the latets tarball in order to get its sha256 sum.
134
+ #
135
+
136
+ rm cordless.rb
137
+ wget https://github.com/Bios-Marcel/cordless/archive/$RELEASE_DATE .tar.gz
138
+ TAR_HASH=" $( sha256sum ./$RELEASE_DATE .tar.gz | cut -f 1 -d " " ) "
139
+ export TAR_HASH
140
+ rm ./$RELEASE_DATE .tar.gz
141
+ envsubst < cordless.rb_template > cordless.rb
131
142
132
143
#
133
144
# Unsetting(and unexporting) previously exported environment variables.
134
145
#
135
146
136
147
unset RELEASE_DATE
137
- unset EXE_HASH
148
+ unset EXE_HASH
149
+ unset TAR_HASH
You can’t perform that action at this time.
0 commit comments