From 8cb68b4abbaec82d42337be01c7f2379c2ea8769 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 00:01:33 +0900 Subject: [PATCH 01/14] feat(ghr): Use bottle --- Formula/ghr.rb | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/Formula/ghr.rb b/Formula/ghr.rb index 013ed80..be33f01 100644 --- a/Formula/ghr.rb +++ b/Formula/ghr.rb @@ -1,35 +1,21 @@ class Ghr < Formula desc "Yet another repository management with auto-attaching profiles" homepage "https://github.com/siketyan/ghr" + url "https://github.com/siketyan/ghr/archive/refs/tags/v0.3.11.tar.gz" + sha256 "d5583898f1d881b63585afe226bb3a83acf389c874aa7ca348662efe4b71bf76" version "0.3.11" license "MIT" - on_macos do - if Hardware::CPU.intel? - url "https://github.com/siketyan/ghr/releases/download/v0.3.11/ghr-x86_64-apple-darwin.tar.gz" - sha256 "29d3689f052a9cde9a21f99e1f73c45909712cf130f44d453a1490b9a50be7c9" - else - url "https://github.com/siketyan/ghr/releases/download/v0.3.11/ghr-aarch64-apple-darwin.tar.gz" - sha256 "bdf8c1b0695632eecd2b6ce9ebb3d4416163624c31fbe858b5134966207c4444" - end - - def install - bin.install "ghr" - end + bottle do end - on_linux do - if Hardware::CPU.intel? - url "https://github.com/siketyan/ghr/releases/download/v0.3.11/ghr-x86_64-unknown-linux-gnu.tar.gz" - sha256 "038825df6e7ac306ed5506481edf0f66433942e238e8bc5521feac2c76be88f3" - else - url "https://github.com/siketyan/ghr/releases/download/v0.3.11/ghr-aarch64-unknown-linux-gnu.tar.gz" - sha256 "677e6582d25bc3ba9b39a9459635dd24276f978936dbfdaab6a536dc445ecab9" - end + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args - def install - bin.install "ghr" - end + bash_completion.install "resources/shell/bash/ghr-completion.bash" + fish_completion.install "resources/shell/fish/ghr-completion.fish" end test do From 8019aaebd3749d3bc2d00d3e65111f007506e0e0 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 00:04:50 +0900 Subject: [PATCH 02/14] style(ghr): Remove bottle section --- Formula/ghr.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/Formula/ghr.rb b/Formula/ghr.rb index be33f01..e8fcc4e 100644 --- a/Formula/ghr.rb +++ b/Formula/ghr.rb @@ -6,9 +6,6 @@ class Ghr < Formula version "0.3.11" license "MIT" - bottle do - end - depends_on "rust" => :build def install From 17b514df1253c2383105caa33aa0e1fbd07c4461 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 00:08:49 +0900 Subject: [PATCH 03/14] style(ghr): Place version before sha256 --- Formula/ghr.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/ghr.rb b/Formula/ghr.rb index e8fcc4e..c7d3e90 100644 --- a/Formula/ghr.rb +++ b/Formula/ghr.rb @@ -2,8 +2,8 @@ class Ghr < Formula desc "Yet another repository management with auto-attaching profiles" homepage "https://github.com/siketyan/ghr" url "https://github.com/siketyan/ghr/archive/refs/tags/v0.3.11.tar.gz" - sha256 "d5583898f1d881b63585afe226bb3a83acf389c874aa7ca348662efe4b71bf76" version "0.3.11" + sha256 "d5583898f1d881b63585afe226bb3a83acf389c874aa7ca348662efe4b71bf76" license "MIT" depends_on "rust" => :build From 1150d2851b423318549730a350dab5a64a6c0783 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 00:12:31 +0900 Subject: [PATCH 04/14] fix: Remove redundant versions --- Formula/ghr.rb | 1 - Formula/jpki-cli.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/Formula/ghr.rb b/Formula/ghr.rb index c7d3e90..31edafa 100644 --- a/Formula/ghr.rb +++ b/Formula/ghr.rb @@ -2,7 +2,6 @@ class Ghr < Formula desc "Yet another repository management with auto-attaching profiles" homepage "https://github.com/siketyan/ghr" url "https://github.com/siketyan/ghr/archive/refs/tags/v0.3.11.tar.gz" - version "0.3.11" sha256 "d5583898f1d881b63585afe226bb3a83acf389c874aa7ca348662efe4b71bf76" license "MIT" diff --git a/Formula/jpki-cli.rb b/Formula/jpki-cli.rb index 7c40d4b..db47970 100644 --- a/Formula/jpki-cli.rb +++ b/Formula/jpki-cli.rb @@ -1,7 +1,6 @@ class JpkiCli < Formula desc "Read certificates, sign and verify documents using your JPKI card" homepage "https://github.com/siketyan/jpki-rs" - version "0.3.0" license "LGPL-2.1" on_macos do From 587f96f92042135b38278dd71826f6ddb9a17b27 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 00:35:23 +0900 Subject: [PATCH 05/14] fix: Add openssl@3 as a dependency --- Formula/ghr.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/ghr.rb b/Formula/ghr.rb index 31edafa..10690f0 100644 --- a/Formula/ghr.rb +++ b/Formula/ghr.rb @@ -6,6 +6,7 @@ class Ghr < Formula license "MIT" depends_on "rust" => :build + depends_on "openssl@3" def install system "cargo", "install", *std_cargo_args From cd67969185e71305b52124c9dcb5c851cf0f6d74 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 01:01:38 +0900 Subject: [PATCH 06/14] ci: Add macOS 13 x86 and Arm64 --- .github/workflows/tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a898f98..daa3fdc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,11 @@ jobs: test-bot: strategy: matrix: - os: [ubuntu-22.04, macos-12] + os: + - ubuntu-22.04 + - macos-12-large + - macos-13-large + - macos-13-xlarge runs-on: ${{ matrix.os }} steps: - name: Set up Homebrew @@ -38,7 +42,7 @@ jobs: - run: brew test-bot --only-tap-syntax - run: brew test-bot --only-formulae - if: ${{ github.event_name == 'pull_request' && matrix.os == 'macos-12' }} + if: github.event_name == 'pull_request' - name: Upload bottles as artifact if: always() && github.event_name == 'pull_request' From 3f5c92be29bf676484bda813c769addd88d05abe Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 01:07:45 +0900 Subject: [PATCH 07/14] fix(jpki-cli): Remove if condition for Linux --- Formula/jpki-cli.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Formula/jpki-cli.rb b/Formula/jpki-cli.rb index db47970..564ef21 100644 --- a/Formula/jpki-cli.rb +++ b/Formula/jpki-cli.rb @@ -18,13 +18,11 @@ def install end on_linux do - if Hardware::CPU.intel? && Hardware::CPU.is_64_bit? - url "https://github.com/siketyan/jpki-rs/releases/download/0.3.0/jpki-cli-x86_64-unknown-linux-gnu.tar.gz" - sha256 "47f77a6d374059caa48566806fc72e30c5e53a876b0851c9ac49bc07d5ae8117" + url "https://github.com/siketyan/jpki-rs/releases/download/0.3.0/jpki-cli-x86_64-unknown-linux-gnu.tar.gz" + sha256 "47f77a6d374059caa48566806fc72e30c5e53a876b0851c9ac49bc07d5ae8117" - def install - bin.install "jpki-cli" - end + def install + bin.install "jpki-cli" end end From a4418cc539aa279a0683257eda8b9903727a66a6 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 01:15:45 +0900 Subject: [PATCH 08/14] fix(jpki-cli): Use on_intel directive --- Formula/jpki-cli.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Formula/jpki-cli.rb b/Formula/jpki-cli.rb index 564ef21..e20a404 100644 --- a/Formula/jpki-cli.rb +++ b/Formula/jpki-cli.rb @@ -18,11 +18,13 @@ def install end on_linux do - url "https://github.com/siketyan/jpki-rs/releases/download/0.3.0/jpki-cli-x86_64-unknown-linux-gnu.tar.gz" - sha256 "47f77a6d374059caa48566806fc72e30c5e53a876b0851c9ac49bc07d5ae8117" + on_intel do + url "https://github.com/siketyan/jpki-rs/releases/download/0.3.0/jpki-cli-x86_64-unknown-linux-gnu.tar.gz" + sha256 "47f77a6d374059caa48566806fc72e30c5e53a876b0851c9ac49bc07d5ae8117" - def install - bin.install "jpki-cli" + def install + bin.install "jpki-cli" + end end end From 653e62b22f83e2890ae4cefd501a2eaa792661ab Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 01:28:47 +0900 Subject: [PATCH 09/14] feat(jpki-cli): Use bottles --- Formula/jpki-cli.rb | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/Formula/jpki-cli.rb b/Formula/jpki-cli.rb index e20a404..e15a3fc 100644 --- a/Formula/jpki-cli.rb +++ b/Formula/jpki-cli.rb @@ -1,31 +1,21 @@ class JpkiCli < Formula desc "Read certificates, sign and verify documents using your JPKI card" homepage "https://github.com/siketyan/jpki-rs" + url "https://github.com/siketyan/jpki-rs/archive/refs/tags/0.3.0.tar.gz" + sha256 "e42576953c1a83589419b9ff40fde00e07fbd8723cad78d6108be1ffc695fcda" license "LGPL-2.1" - on_macos do - if Hardware::CPU.intel? - url "https://github.com/siketyan/jpki-rs/releases/download/0.3.0/jpki-cli-x86_64-apple-darwin.tar.gz" - sha256 "6afc3d1de0666c782aae7c94c19f5e3f2b0b0b2b27d48b632bc77b187afa24bb" - else - url "https://github.com/siketyan/jpki-rs/releases/download/0.3.0/jpki-cli-aarch64-apple-darwin.tar.gz" - sha256 "9dcbd0a02b79d279932694b5bf40a1266c17b3db021f9e863b6c60640f3cc7b3" - end + depends_on "rust" => :build - def install - bin.install "jpki-cli" - end + on_linux do + depends_on "pcsc-lite" end - on_linux do - on_intel do - url "https://github.com/siketyan/jpki-rs/releases/download/0.3.0/jpki-cli-x86_64-unknown-linux-gnu.tar.gz" - sha256 "47f77a6d374059caa48566806fc72e30c5e53a876b0851c9ac49bc07d5ae8117" + def install + system "cargo", "install", *std_cargo_args - def install - bin.install "jpki-cli" - end - end + bash_completion.install "resources/shell/bash/ghr-completion.bash" + fish_completion.install "resources/shell/fish/ghr-completion.fish" end test do From fc565acc6ea046c3cc3619650b712938503f2593 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 01:49:12 +0900 Subject: [PATCH 10/14] ci: Include OS version in cache key --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index daa3fdc..e7aae00 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,8 +28,8 @@ jobs: uses: actions/cache@v1 with: path: ${{ steps.set-up-homebrew.outputs.gems-path }} - key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} - restore-keys: ${{ runner.os }}-rubygems- + key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} + restore-keys: ${{ matrix.os }}-rubygems- - name: Install Homebrew Bundler RubyGems if: steps.cache.outputs.cache-hit != 'true' From 66ded141dfbd92579a6f324cdb258d5c809c039f Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 02:15:30 +0900 Subject: [PATCH 11/14] fix(ghr): Require zlib on Linux --- Formula/ghr.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Formula/ghr.rb b/Formula/ghr.rb index 10690f0..19853be 100644 --- a/Formula/ghr.rb +++ b/Formula/ghr.rb @@ -8,6 +8,11 @@ class Ghr < Formula depends_on "rust" => :build depends_on "openssl@3" + on_linux do + depends_on "pkg-config" => :build + depends_on "zlib" + end + def install system "cargo", "install", *std_cargo_args From 963a3739f2011bbc1d4d57a0f3ec3d744491ad97 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Sat, 21 Oct 2023 02:33:39 +0900 Subject: [PATCH 12/14] ci: Use non-large runner on macOS 12 and 13 x86 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e7aae00..6c1c8d3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,8 +10,8 @@ jobs: matrix: os: - ubuntu-22.04 - - macos-12-large - - macos-13-large + - macos-12 + - macos-13 - macos-13-xlarge runs-on: ${{ matrix.os }} steps: From 689e92d84e625e712373d241e4087fc0fcde01c8 Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Mon, 23 Oct 2023 20:38:13 +0900 Subject: [PATCH 13/14] feat(jpki-cli): Bump to v0.4.3 --- Formula/jpki-cli.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Formula/jpki-cli.rb b/Formula/jpki-cli.rb index e15a3fc..7b27caf 100644 --- a/Formula/jpki-cli.rb +++ b/Formula/jpki-cli.rb @@ -1,8 +1,8 @@ class JpkiCli < Formula desc "Read certificates, sign and verify documents using your JPKI card" homepage "https://github.com/siketyan/jpki-rs" - url "https://github.com/siketyan/jpki-rs/archive/refs/tags/0.3.0.tar.gz" - sha256 "e42576953c1a83589419b9ff40fde00e07fbd8723cad78d6108be1ffc695fcda" + url "https://github.com/siketyan/jpki-rs/archive/refs/tags/0.4.3.tar.gz" + sha256 "c7954b0b0f0713a3706ac76e506128fb512c0dab488b71daba33d64d1e379b8f" license "LGPL-2.1" depends_on "rust" => :build @@ -13,9 +13,6 @@ class JpkiCli < Formula def install system "cargo", "install", *std_cargo_args - - bash_completion.install "resources/shell/bash/ghr-completion.bash" - fish_completion.install "resources/shell/fish/ghr-completion.fish" end test do From 1f5e91fdb887ade9d62a4b9de2a8e2e052cd2c9a Mon Sep 17 00:00:00 2001 From: Natsuki Ikeguchi Date: Mon, 23 Oct 2023 20:50:26 +0900 Subject: [PATCH 14/14] fix(jpki-cli): Run cargo install in cli directory --- Formula/jpki-cli.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Formula/jpki-cli.rb b/Formula/jpki-cli.rb index 7b27caf..27081e4 100644 --- a/Formula/jpki-cli.rb +++ b/Formula/jpki-cli.rb @@ -12,7 +12,9 @@ class JpkiCli < Formula end def install - system "cargo", "install", *std_cargo_args + chdir "cli" do + system "cargo", "install", *std_cargo_args + end end test do