From 25db713ea638c49d19e03e7dd26e642123e93517 Mon Sep 17 00:00:00 2001 From: saltbo Date: Mon, 29 Jun 2020 00:09:16 +0800 Subject: [PATCH] uptoc 1.4.3(new formula) Closes #56956. Signed-off-by: Dawid Dziurla --- Formula/uptoc.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Formula/uptoc.rb diff --git a/Formula/uptoc.rb b/Formula/uptoc.rb new file mode 100644 index 00000000000..85a61b27043 --- /dev/null +++ b/Formula/uptoc.rb @@ -0,0 +1,21 @@ +class Uptoc < Formula + desc "Convenient static file deployment tool that supports multiple platforms" + homepage "https://github.com/saltbo/uptoc" + url "https://github.com/saltbo/uptoc.git", + :tag => "v1.4.3", + :revision => "30266b490379c816fc08ca3670fd96808214b24c" + + depends_on "go" => :build + + def install + system "go", "build", "-ldflags", + "-s -w -X main.release=#{version} -X main.commit=#{stable.specs[:revision]} -X main.repo=#{stable.url}", + *std_go_args, + "./cmd" + end + + test do + assert_match version.to_s, shell_output("#{bin}/uptoc -v 2>&1") + assert_match "uptoc config", shell_output("#{bin}/uptoc ./abc 2>&1", 1) + end +end