From 55a9652d5435d5b02ed4dd2c6f38e0cc4cfbf825 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 7 Apr 2022 19:15:00 -0400 Subject: [PATCH 1/5] Add formula download option to avoid upgrade conflict with homebrew/cask --- Aliases/1password-cli | 1 + Formula/onepasswordcli.rb | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 120000 Aliases/1password-cli create mode 100644 Formula/onepasswordcli.rb diff --git a/Aliases/1password-cli b/Aliases/1password-cli new file mode 120000 index 0000000..39b1e05 --- /dev/null +++ b/Aliases/1password-cli @@ -0,0 +1 @@ +../Formula/onepasswordcli.rb \ No newline at end of file diff --git a/Formula/onepasswordcli.rb b/Formula/onepasswordcli.rb new file mode 100644 index 0000000..ab0d9cf --- /dev/null +++ b/Formula/onepasswordcli.rb @@ -0,0 +1,23 @@ +class Onepasswordcli < Formula + desc "Command-line interface for 1Password" + homepage "https://1password.com" + version "2.0.0" + if OS.mac? + if Hardware::CPU.arm? + url "https://cache.agilebits.com/dist/1P/op2/pkg/v#{version}/1password-cli_v#{version}_darwin_arm64.tar.gz" + sha256 "413f421e8d260226e305af4b48a5003b74d78f3724bb2305c36e22059c04f981" + elsif Hardware::CPU.intel? + url "https://cache.agilebits.com/dist/1P/op2/pkg/v#{version}/1password-cli_v#{version}_darwin_amd64.tar.gz" + sha256 "b044e1565fa162df790875fd7a57f05bd6121fddc1d4e320d2c3007ccf5b23d1" + end + elsif OS.linux? + if Hardware::CPU.intel? + url "https://cache.agilebits.com/dist/1P/op2/pkg/v#{version}/op_linux_amd64_v#{version}.tar.gz" + sha256 "eb4fb92779d3b6bef3a61c56bd4b7a0872034b3fe55123dba3584d7db948215a" + end + end + def install + bin.install "op" + end +end + From c1dd5b08412f13b43a6a86577552c057b30d1cd0 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 7 Apr 2022 19:19:36 -0400 Subject: [PATCH 2/5] update readme instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d0e6173..1d7d6a2 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,4 @@ | Name | Description | Installation command | |------|-------------|----------------------| -| [1password-cli](https://developer.1password.com/docs/cli/) | Command-line interface for 1Password | `brew install --cask 1password/tap/1password-cli` | +| [1password-cli](https://developer.1password.com/docs/cli/) | Command-line interface for 1Password | `brew install --build-from-source 1password/tap/1password-cli` | From 7c0d905b5cc5ccfbf85999f5650473bd021e2349 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 10 Jun 2022 10:54:27 -0400 Subject: [PATCH 3/5] update to 2.4.1 --- Formula/onepasswordcli.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Formula/onepasswordcli.rb b/Formula/onepasswordcli.rb index ab0d9cf..f2140ec 100644 --- a/Formula/onepasswordcli.rb +++ b/Formula/onepasswordcli.rb @@ -1,23 +1,22 @@ class Onepasswordcli < Formula desc "Command-line interface for 1Password" homepage "https://1password.com" - version "2.0.0" + version "2.4.1" if OS.mac? if Hardware::CPU.arm? url "https://cache.agilebits.com/dist/1P/op2/pkg/v#{version}/1password-cli_v#{version}_darwin_arm64.tar.gz" - sha256 "413f421e8d260226e305af4b48a5003b74d78f3724bb2305c36e22059c04f981" + sha256 "6e870b558400e568003ce3e677c0b6a08266f79ff9b86acfe82f875d033aff2e" elsif Hardware::CPU.intel? url "https://cache.agilebits.com/dist/1P/op2/pkg/v#{version}/1password-cli_v#{version}_darwin_amd64.tar.gz" - sha256 "b044e1565fa162df790875fd7a57f05bd6121fddc1d4e320d2c3007ccf5b23d1" + sha256 "c9f627fcf0ee4abd5f0ecf01d08f1c96fcb9863664a58ccfa5512f911e7378ed" end elsif OS.linux? if Hardware::CPU.intel? url "https://cache.agilebits.com/dist/1P/op2/pkg/v#{version}/op_linux_amd64_v#{version}.tar.gz" - sha256 "eb4fb92779d3b6bef3a61c56bd4b7a0872034b3fe55123dba3584d7db948215a" + sha256 "fcc3ffdb0547f1f4e65f30f56e7fa27b9d944355ef7be50e84b7bb43dcd05cb0" end end def install bin.install "op" end end - From 91de8506a617815652f3964e726d072bc05d6794 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 10 Jun 2022 15:34:55 -0400 Subject: [PATCH 4/5] change brew pkg name to op-cli to remove conflict with main brew repo pkg, add readme --- Aliases/1password-cli | 1 - Formula/{onepasswordcli.rb => op-cli.rb} | 2 +- README.md | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 120000 Aliases/1password-cli rename Formula/{onepasswordcli.rb => op-cli.rb} (96%) diff --git a/Aliases/1password-cli b/Aliases/1password-cli deleted file mode 120000 index 39b1e05..0000000 --- a/Aliases/1password-cli +++ /dev/null @@ -1 +0,0 @@ -../Formula/onepasswordcli.rb \ No newline at end of file diff --git a/Formula/onepasswordcli.rb b/Formula/op-cli.rb similarity index 96% rename from Formula/onepasswordcli.rb rename to Formula/op-cli.rb index f2140ec..6f5d6a7 100644 --- a/Formula/onepasswordcli.rb +++ b/Formula/op-cli.rb @@ -1,4 +1,4 @@ -class Onepasswordcli < Formula +class OpCli < Formula desc "Command-line interface for 1Password" homepage "https://1password.com" version "2.4.1" diff --git a/README.md b/README.md index 1d7d6a2..17a9c55 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,5 @@ | Name | Description | Installation command | |------|-------------|----------------------| -| [1password-cli](https://developer.1password.com/docs/cli/) | Command-line interface for 1Password | `brew install --build-from-source 1password/tap/1password-cli` | +| [1password-cli](https://developer.1password.com/docs/cli/) | Command-line interface for 1Password (Cask) | `brew install --build-from-source 1password/tap/1password-cli` | +| [1password-cli](https://developer.1password.com/docs/cli/) | Command-line interface for 1Password (Formula) | `brew install https://github.com/1Password/homebrew-tap/blob/main/Formula/op-cli.rb` | From 998ac133e753998f3c3ebeee2c5396fa051b187c Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 10 Jun 2022 15:58:08 -0400 Subject: [PATCH 5/5] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 17a9c55..8ac6875 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,4 @@ | Name | Description | Installation command | |------|-------------|----------------------| | [1password-cli](https://developer.1password.com/docs/cli/) | Command-line interface for 1Password (Cask) | `brew install --build-from-source 1password/tap/1password-cli` | -| [1password-cli](https://developer.1password.com/docs/cli/) | Command-line interface for 1Password (Formula) | `brew install https://github.com/1Password/homebrew-tap/blob/main/Formula/op-cli.rb` | +| [1password-cli](https://developer.1password.com/docs/cli/) | Command-line interface for 1Password (Formula) | `brew tap 1Password/tap && brew install op-cli` |