Vigiar
1
0
Derivar
Você já tinha feito uma derivação do repositório homebrew-tap, anteriormente
0
homebrew-tap/Formula/aio.rb

35 linhas
1,2 KiB
Ruby

# Homebrew formula for aio, the Interweb Angola All in One AI command.
# The package is the aio-<version>.tgz asset of the api-cli release on git.interweb.ao.
class Aio < Formula
desc "Command-line client for Interweb Angola All in One AI"
homepage "https://docs.interweb.ao/cli/"
url "https://git.interweb.ao/interweb-ao/api-cli/releases/download/v1.0.1/aio-1.0.1.tgz"
sha256 "6700c8cb482d76e818c9785351636d9635a639661177ff58fdbb808f9436859d"
license "MIT"
depends_on "node"
def install
# aio is a single file with no dependencies: keep it in libexec and
# start it with the Node.js from Homebrew, whatever node is on PATH.
libexec.install "bin/aio.js"
(bin/"aio").write <<~SH
#!/bin/sh
exec "#{Formula["node"].opt_bin}/node" "#{libexec}/aio.js" "$@"
SH
chmod 0755, bin/"aio"
end
def caveats
<<~EOS
Create an API key with the ai:read and ai:write permissions in the
API Center (https://www.meu.interweb.ao/api-center.php), then run:
aio auth login
Or set the key in the AIO_API_KEY environment variable.
EOS
end
test do
assert_match "aio #{version}", shell_output("#{bin}/aio --version")
end
end