Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Formula/aittributor.rb @alecthomas
Formula/anchors.rb @loganj
Formula/francis.rb @tcmulcahy
Formula/ghost.rb @chailandau @nahiyankhan
Formula/lhm.rb @alecthomas
Formula/qrgo.rb @afollestad
Formula/radiography.rb @tcmulcahy @zach-klippenstein
Expand Down
35 changes: 35 additions & 0 deletions Formula/ghost.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Release metadata is managed by .github/workflows/bump-formula.yaml.
# Avoid manual edits to `url`, `sha256`, and `version`; the bump workflow rewrites them.
# Run: gh workflow run bump-formula.yaml -f repo=block/ghost -f formula=ghost -f tag=<tag> -f artifact_url=<artifact_url> [-f sha256=<sha256>]

class Ghost < Formula
desc "Product-surface composition fingerprints, checks, review, and comparison"
homepage "https://github.com/block/ghost"
url "https://github.com/block/ghost/releases/download/anarchitecture-ghost@0.11.1/anarchitecture-ghost-0.11.1.tgz"
sha256 "940bb6a9008598a11e70a0ee67753a722770ef75099e2711e46de52a73a5e5b6"
license "Apache-2.0"
version "0.11.1"

depends_on "node"

def install
# The release artifact is the published npm tarball, which extracts to a
# `package/` directory containing the built `dist/` and `package.json`.
# Ship those into libexec, install the (pure-JS) runtime deps, and link
# the CLI entrypoint onto the PATH.
libexec.install Dir["package/*"]

cd libexec do
system "npm", "install", *std_npm_args(prefix: false), "--omit=dev", "--no-audit", "--no-fund"
end

(libexec/"dist/bin.js").chmod 0755
bin.install_symlink libexec/"dist/bin.js" => "ghost"
end

test do
assert_path_exists bin/"ghost"
assert_predicate bin/"ghost", :executable?
assert_match "ghost/#{version}", shell_output("#{bin}/ghost --version")
end
end