From 74179cc85979d91a156a970f3f0523c0cc1926cc Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Tue, 29 Dec 2020 11:19:43 +1100 Subject: [PATCH] yq@3 3.4.1 (new formula) Closes #67923. Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> Signed-off-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> --- Aliases/yq@4 | 1 + Formula/yq@3.rb | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 120000 Aliases/yq@4 create mode 100644 Formula/yq@3.rb diff --git a/Aliases/yq@4 b/Aliases/yq@4 new file mode 120000 index 00000000000..76bef9f02dc --- /dev/null +++ b/Aliases/yq@4 @@ -0,0 +1 @@ +../Formula/yq.rb \ No newline at end of file diff --git a/Formula/yq@3.rb b/Formula/yq@3.rb new file mode 100644 index 00000000000..db77d9771e8 --- /dev/null +++ b/Formula/yq@3.rb @@ -0,0 +1,22 @@ +class YqAT3 < Formula + desc "Process YAML documents from the CLI - Version 3" + homepage "https://github.com/mikefarah/yq" + url "https://github.com/mikefarah/yq/archive/3.4.1.tar.gz" + sha256 "73259f808d589d11ea7a18e4cd38a2e98b518a6c2c178d1ec57d9c5942277cb1" + license "MIT" + + keg_only :versioned_formula + + disable! date: "2021-08-01", because: :unmaintained + + depends_on "go" => :build + + def install + system "go", "build", "-ldflags", "-s -w", *std_go_args, "-o", bin/"yq" + end + + test do + assert_equal "key: cat", shell_output("#{bin}/yq n key cat").chomp + assert_equal "cat", pipe_output("#{bin}/yq r - key", "key: cat", 0).chomp + end +end