Skip to content

Commit

Permalink
add support for linux brew
Browse files Browse the repository at this point in the history
[Finishes #153037124]

Signed-off-by: Anand Gaitonde <agaitonde@pivotal.io>
  • Loading branch information
vitreuz authored and XenoPhex committed Nov 20, 2017
1 parent 7c823f2 commit 2f032be
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions ci/cli-release/tasks/update-brew-formula.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@ run:
VERSION=$(cat cli/ci/VERSION)
mkdir cf-cli-osx-tarball
curl -L "https://cli.run.pivotal.io/stable?release=macosx64-binary&version=${VERSION}&source=github-rel" > cf-cli-osx-tarball/cf-cli_${VERSION}_osx.tgz
mkdir cf-cli-osx-tarball cf-cli-linux-tarball
curl -L "https://packages.cloudfoundry.org/stable?release=macosx64-binary&version=${VERSION}&source=github-rel" > cf-cli-osx-tarball/cf-cli_${VERSION}_osx.tgz
curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=${VERSION}&source=github-rel" > cf-cli-linux-tarball/cf-cli_${VERSION}_linux64.tgz
pushd cf-cli-osx-tarball
CLI_SHA256=$(shasum -a 256 cf-cli_*_osx.tgz | cut -d ' ' -f 1)
CLI_OSX_SHA256=$(shasum -a 256 cf-cli_*_osx.tgz | cut -d ' ' -f 1)
popd
pushd cf-cli-linux-tarball
CLI_LINUX_64_SHA256=$(shasum -a 256 cf-cli_*_linux64.tgz | cut -d ' ' -f 1)
popd
pushd homebrew-tap
Expand All @@ -38,10 +45,17 @@ run:
class CfCli < Formula
homepage 'https://code.cloudfoundry.org/cli'
head 'https://packages.cloudfoundry.org/edge?arch=macosx64&source=homebrew'
url 'https://packages.cloudfoundry.org/stable?release=macosx64-binary&version=${VERSION}&source=homebrew'
version '${VERSION}'
sha256 '${CLI_SHA256}'
if OS.mac?
head 'https://packages.cloudfoundry.org/edge?arch=macosx64&source=homebrew'
url 'https://packages.cloudfoundry.org/stable?release=macosx64-binary&version=${VERSION}&source=homebrew'
sha256 '${CLI_OSX_SHA256}'
elsif OS.linux?
head 'https://packages.cloudfoundry.org/edge?arch=linux64&source=homebrew'
url 'https://packages.cloudfoundry.org/stable?release=linux64-binary&version=${VERSION}&source=homebrew'
sha256 '${CLI_LINUX_64_SHA256}'
end
depends_on :arch => :x86_64
Expand Down

0 comments on commit 2f032be

Please sign in to comment.