From 1a299d3a63db5651ba3688b60188ef6af27d61c0 Mon Sep 17 00:00:00 2001 From: Dominik Tomasi Date: Tue, 21 Nov 2023 11:27:21 +0100 Subject: [PATCH 1/2] feat: add yj for converting between JSON,YAML,TOML and HCL Signed-off-by: Dominik Tomasi --- yj.hcl | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 yj.hcl diff --git a/yj.hcl b/yj.hcl new file mode 100644 index 00000000..8bfdf4b7 --- /dev/null +++ b/yj.hcl @@ -0,0 +1,38 @@ +description = "yj - Convert between YAML, TOML, JSON, and HCL. Preserves map order." +homepage = "https://github.com/sclevine/yj" +binaries = ["yj"] +test = "yj -v" + +darwin { + source = "https://github.com/sclevine/yj/releases/download/v${version}/yj-macos-${arch}" + + on "unpack" { + rename { + from = "${root}/yj-macos-${arch}" + to = "${root}/yj" + } + } +} + +linux { + source = "https://github.com/sclevine/yj/releases/download/v${version}/yj-linux-${arch}" + + on "unpack" { + rename { + from = "${root}/yj-macos-${arch}" + to = "${root}/yj" + } + } +} + +version "5.1.0" { + auto-version { + github-release = "sclevine/yj" + } +} + +sha256sums = { + "https://github.com/sclevine/yj/releases/download/v5.1.0/yj-macos-arm64": "c8185c694884a01e8aa8f6f5a4b3d34993bd65c3f019de64cf0ea743d1fd038a", + "https://github.com/sclevine/yj/releases/download/v5.1.0/yj-linux-amd64": "8ce43e40fda9a28221dabc0d7228e2325d1e959cd770487240deb47e02660986", + "https://github.com/sclevine/yj/releases/download/v5.1.0/yj-macos-amd64": "261eedd7fd497930ef4d6793c0f11e8375896ed5f96449b9cdc1506b1c249343", +} From 4589755679bbbed114d6e2151a309a4019cbdd85 Mon Sep 17 00:00:00 2001 From: Dominik Tomasi Date: Tue, 21 Nov 2023 11:33:26 +0100 Subject: [PATCH 2/2] fix: fix wrong unpack command Signed-off-by: Dominik Tomasi --- yj.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yj.hcl b/yj.hcl index 8bfdf4b7..ee4af568 100644 --- a/yj.hcl +++ b/yj.hcl @@ -19,7 +19,7 @@ linux { on "unpack" { rename { - from = "${root}/yj-macos-${arch}" + from = "${root}/yj-linux-${arch}" to = "${root}/yj" } }