-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmynewt-newt@1.7.rb
36 lines (29 loc) · 1.06 KB
/
mynewt-newt@1.7.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# typed: false
# frozen_string_literal: true
class MynewtNewtAT17 < Formula
desc "Package, build and installation system for Mynewt OS applications"
homepage "https://mynewt.apache.org"
url "https://github.com/apache/mynewt-newt/archive/mynewt_1_7_0_tag.tar.gz"
version "1.7.0"
sha256 "6aefb5aaae06c4b9d514333ec682f62bd52e97e9d8e7b9f9c50e15983590f1f7"
bottle do
root_url "https://github.com/JuulLabs-OSS/binary-releases/raw/master/mynewt-newt-tools_1.7.0"
sha256 cellar: :any_skip_relocation, high_sierra: "2eb52488b0dd8faf2d6a6764a8ea9d8132625bfae9f599fa23292b4bf5b6679b"
end
keg_only :versioned_formula
depends_on "go" => :build
depends_on arch: :x86_64
def install
contents = Dir["{*,.git,.gitignore}"]
gopath = buildpath/"gopath"
(gopath/"src/mynewt.apache.org/newt").install contents
cd gopath/"src/mynewt.apache.org/newt" do
system "./build.sh"
bin.install "newt/newt"
end
end
test do
# Compare newt version string
assert_equal "1.7.0", shell_output("#{bin}/newt version").split.last
end
end