Skip to content

Commit

Permalink
oakc 0.6.1 (new formula)
Browse files Browse the repository at this point in the history
Closes #66697.

Signed-off-by: chenrui <chenrui333@gmail.com>
  • Loading branch information
vladimyr authored and chenrui333 committed Dec 13, 2020
1 parent 58e1ebf commit 45212b9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Formula/oakc.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
class Oakc < Formula
desc "Portable programming language with a compact intermediate representation"
homepage "https://github.com/adam-mcdaniel/oakc"
url "https://static.crates.io/crates/oakc/oakc-0.6.1.crate"
sha256 "1f4a90a3fd5c8ae32cb55c7a38730b6bfcf634f75e6ade0fd51c9db2a2431683"
license "Apache-2.0"
head "https://github.com/adam-mcdaniel/oakc.git"

livecheck do
url "https://docs.rs/oakc"
regex(%r{/oakc/v?(\d+(?:\.\d+)+)/}i)
end

depends_on "rust" => :build

def install
system "tar", "--strip-components", "1", "-xzvf", "oakc-#{version}.crate"
system "cargo", "install", *std_cargo_args
pkgshare.install "examples"
end

test do
system bin/"oak", "-c", "c", pkgshare/"examples/hello_world.ok"
assert_equal "Hello world!\n", shell_output("./main")
assert_match "This file tests Oak's doc subcommand",
shell_output("#{bin}/oak doc #{pkgshare}/examples/flags/doc.ok")
end
end

0 comments on commit 45212b9

Please sign in to comment.