Add additionla step to build, that creates the homebrew file.
ADD
cordless.rb_template
+class Cordless < Formula
+ desc "Discord, but in 1984"
+ homepage "https://github.com/Bios-Marcel/cordless"
+ url "https://github.com/Bios-Marcel/cordless/archive/$RELEASE_DATE.tar.gz"
+ version "$RELEASE_DATE"
+ sha256 "$TAR_HASH"
+ head "https://github.com/Bios-Marcel/cordless.git"
+
+ depends_on "go" => :build
+ depends_on "pngpaste" => :recommended
+
+ def install
+ ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache"
+ (buildpath/"src/github.com/Bios-Marcel/cordless").install buildpath.children
+ cd "src/github.com/Bios-Marcel/cordless" do
+ system "go", "build", "-o", bin/"cordless"
+ prefix.install_metafiles
+ end
+ end
+
+ test do
+ system "true"
+ end
+ end
+
\ No newline at end of file

MODIFY
release.sh
release.sh
@@ -128,6 +128,17 @@ else
hub release create -a "$BIN_LINUX" -a "$BIN_DARWIN" -a "$BIN_WINDOWS" -m "${RELEASE_DATE}" -m "${RELEASE_BODY}" "$RELEASE_DATE"
fi
+#
+# Substitutes the manifest template for the homebrew package. We need to
+# download the latets tarball in order to get its sha256 sum.
+#
+
+rm cordless.rb
+wget https://github.com/Bios-Marcel/cordless/archive/$RELEASE_DATE.tar.gz
+TAR_HASH="$(sha256sum ./$RELEASE_DATE.tar.gz | cut -f 1 -d " ")"
+export TAR_HASH
+rm ./$RELEASE_DATE.tar.gz
+envsubst < cordless.rb_template > cordless.rb
#
# Unsetting(and unexporting) previously exported environment variables.
@@ -135,3 +146,4 @@ fi
unset RELEASE_DATE
unset EXE_HASH
+unset TAR_HASH
\ No newline at end of file

Add additionla step to build, that creates the homebrew file.