homebrew-core/Formula/bitrise.rb

47 lines
1.4 KiB
Ruby
Raw Normal View History

class Bitrise < Formula
desc "Command-line automation tool"
homepage "https://github.com/bitrise-io/bitrise"
url "https://github.com/bitrise-io/bitrise/archive/1.4.2.tar.gz"
sha256 "bf18d45d841aeef9d6a87b1456e59d748edab87b7ac117c1ae01afe960f976a9"
2015-08-07 07:48:03 +00:00
bottle do
2015-09-13 11:32:36 +00:00
cellar :any_skip_relocation
2016-10-14 12:33:02 +00:00
sha256 "bc4dcdf0ddf68654f4acb566ff9870c122ea83d6a81317b404cceecee5a2ada9" => :sierra
sha256 "2f32720805469a3e46853b9930823de48f5c63c8d8c1ff34118267389ecef1f9" => :el_capitan
sha256 "ed07f28956db844dd9eefca76298acfc3b95d89686ea03d2c64b77f9ef6605fa" => :yosemite
2015-08-07 07:48:03 +00:00
end
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
# Install bitrise
bitrise_go_path = buildpath/"src/github.com/bitrise-io/bitrise"
bitrise_go_path.install Dir["*"]
cd bitrise_go_path do
prefix.install_metafiles
system "go", "build", "-o", bin/"bitrise"
end
end
test do
(testpath/"bitrise.yml").write <<-EOS.undent
format_version: 1.3.1
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
workflows:
test_wf:
steps:
- script:
inputs:
- content: printf 'Test - OK' > brew.test.file
EOS
2016-08-09 12:09:30 +00:00
system "#{bin}/bitrise", "setup"
system "#{bin}/bitrise", "run", "test_wf"
assert_equal "Test - OK", (testpath/"brew.test.file").read.chomp
end
end