Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use bottle distribution #1

Closed
wants to merge 14 commits into from
12 changes: 8 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ jobs:
test-bot:
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os:
- ubuntu-22.04
- macos-12
- macos-13
- macos-13-xlarge
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
Expand All @@ -24,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'
Expand All @@ -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'
Expand Down
34 changes: 11 additions & 23 deletions Formula/ghr.rb
Original file line number Diff line number Diff line change
@@ -1,35 +1,23 @@
class Ghr < Formula
desc "Yet another repository management with auto-attaching profiles"
homepage "https://github.com/siketyan/ghr"
version "0.3.11"
url "https://github.com/siketyan/ghr/archive/refs/tags/v0.3.11.tar.gz"
sha256 "d5583898f1d881b63585afe226bb3a83acf389c874aa7ca348662efe4b71bf76"
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
depends_on "rust" => :build
depends_on "openssl@3"

def install
bin.install "ghr"
end
on_linux do
depends_on "pkg-config" => :build
depends_on "zlib"
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
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
Expand Down
28 changes: 8 additions & 20 deletions Formula/jpki-cli.rb
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
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"
url "https://github.com/siketyan/jpki-rs/archive/refs/tags/0.4.3.tar.gz"
sha256 "c7954b0b0f0713a3706ac76e506128fb512c0dab488b71daba33d64d1e379b8f"
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

def install
bin.install "jpki-cli"
end
end
depends_on "rust" => :build

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"
depends_on "pcsc-lite"
end

def install
bin.install "jpki-cli"
end
def install
chdir "cli" do
system "cargo", "install", *std_cargo_args
end
end

Expand Down
Loading