Skip to content

Commit

Permalink
Merge pull request #3 from Venafi/sigscan-0.1.0
Browse files Browse the repository at this point in the history
redo formula
  • Loading branch information
zosocanuck authored Mar 30, 2023
2 parents ae97e70 + 6d3681a commit 8f3d26e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
pr-pull:
if: contains(github.event.pull_request.labels.*.name, 'pr-pull')
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ jobs:
test-bot:
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
token: ${{ secrets.GH_TOKEN }}

- name: Cache Homebrew Bundler RubyGems
id: cache
Expand Down
42 changes: 42 additions & 0 deletions Formula/sigscan.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
class Sigscan < Formula
desc "Inspect container images and other artifacts for signatures"
homepage "https://github.com/venafi/sigscan"
url "https://github.com/venafi/sigscan/archive/refs/tags/v0.1.0.tar.gz"
version "0.1.0"
license "Apache-2.0"
head "https://github.com/venafi/sigscan.git", tag: "v0.1.0"

on_macos do
if Hardware::CPU.intel?
url "https://github.com/Venafi/sigscan/releases/download/v#{version}/sigscan-darwin-amd64"
sha256 "6365128a172eb19053eee81d274724e96a29640a9366230e90213183f551e93b"
end

if Hardware::CPU.arm?
url "https://github.com/Venafi/sigscan/releases/download/v#{version}/sigscan-darwin-arm64"
sha256 "8022f6350489c03400ce6cc441d864c747f6d645df47ff60c854e05c3c4dd24e"
end
end

on_linux do
if Hardware::CPU.intel?
url "https://github.com/Venafi/sigscan/releases/download/v#{version}/sigscan-linux-amd64"
sha256 "53c84ff2888f509477cafd903402f8afe51c81912afc451b26bfba42e9107264"
end

if Hardware::CPU.arm?
url "https://github.com/Venafi/sigscan/releases/download/v#{version}/sigscan-linux-arm64"
sha256 "bfbc28191d0717344f2e46ef10e0609272b87e74bcb9e9ee459bb0b26faea0ba"
end
end

def install
cpu = Hardware::CPU.intel? ? "amd64" : "arm64"
os = OS.mac? ? "darwin" : "linux"
bin.install "sigscan-#{os}-#{cpu}" => "sigscan"
end

test do
system "#{bin}/sigscan", "-h"
end
end
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

## How do I install these formulae?

`brew install venafi/venafi/<formula>`
`brew install venafi/tap/<formula>`

Or `brew tap venafi/venafi` and then `brew install <formula>`.
Or `brew tap venafi/tap` and then `brew install <formula>`.

## Formulae

| Repository | Formula | Description |
| ---------- | ------- | ----------- |
| [sigscan](https://github.com/venafi/sigscan) | [formula](Formula/sigscan.rb) | Inspect container images and other artifacts for signatures |

## Documentation

Expand Down

0 comments on commit 8f3d26e

Please sign in to comment.