-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from rothgar/patch-1
Support homebrew on linux with formula
- Loading branch information
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,24 +124,36 @@ const DojoVersion = \"${next_version}\" | |
;; | ||
homebrew_tap) | ||
if [ ! -f bin/dojo_darwin_amd64 ]; then echo "dojo_darwin_amd64 binary does not exist"; exit 1; fi | ||
SHA256=$(sha256sum bin/dojo_darwin_amd64 | awk '{printf $1}') | ||
if [ ! -f bin/dojo_linux_amd64 ]; then echo "dojo_linux_amd64 binary does not exist"; exit 1; fi | ||
DARWIN_SHA256=$(sha256sum bin/dojo_darwin_amd64 | awk '{printf $1}') | ||
LINUX_SHA256=$(sha256sum bin/dojo_linux_amd64 | awk '{printf $1}') | ||
VERSION="$(releaser::get_last_version_from_whole_changelog ${changelog_file})" | ||
git clone [email protected]:kudulab/homebrew-dojo-osx.git homebrew-dojo-osx | ||
cd homebrew-dojo-osx | ||
cat << EOF > dojo.rb | ||
class Dojo < Formula | ||
desc "Containerize your development and operations environment" | ||
homepage "https://github.com/kudulab/dojo" | ||
url "https://github.com/kudulab/dojo/releases/download/${VERSION}/dojo_darwin_amd64" | ||
sha256 "${SHA256}" | ||
version "${VERSION}" | ||
bottle :unneeded | ||
if OS.mac? | ||
url "https://github.com/kudulab/dojo/releases/download/${VERSION}/dojo_darwin_amd64" | ||
sha256 "${DARWIN_SHA256}" | ||
def install | ||
bin.install "dojo_darwin_amd64" | ||
mv bin/"dojo_darwin_amd64", bin/"dojo" | ||
end | ||
elsif OS.linux? | ||
if Hardware::CPU.intel? | ||
url "https://github.com/kudulab/dojo/releases/download/${VERSION}/dojo_linux_amd64" | ||
sha256 "${LINUX_SHA256}" | ||
def install | ||
bin.install "dojo_linux_amd64" | ||
mv bin/"dojo_linux_amd64", bin/"dojo" | ||
end | ||
end | ||
end | ||
end | ||
EOF | ||
git add dojo.rb | ||
|