-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added liquid template for cli formula
- Loading branch information
1 parent
c48dcd1
commit 3455372
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
VERSION = "{{ release.version }}" | ||
ARM_SHA = "{{ release.checksum.arm }}" | ||
X86_SHA = "{{ release.checksum.x86 }}" | ||
DESCRIPTION = "{{ release.description, 'default: A utility for getting started with your next Parra.io project.' }}" | ||
|
||
class ParraCli < Formula | ||
desc DESCRIPTION | ||
homepage "https://parra.io" | ||
license "MIT" | ||
url "https://github.com/Parra-Inc/parra-cli.git", tag: VERSION | ||
|
||
on_macos do | ||
if Hardware::CPU.arm? | ||
url "https://github.com/Parra-Inc/parra-cli/releases/download/v#{VERSION}/parra-cli-#{VERSION}.aarch64_apple_darwin.tar.gz" | ||
sha256 ARM_SHA | ||
elsif Hardware::CPU.intel? | ||
url "https://github.com/Parra-Inc/parra-cli/releases/download/v#{VERSION}/parra-cli-#{VERSION}.x86_64_apple_darwin.tar.gz" | ||
sha256 X86_SHA | ||
end | ||
end | ||
|
||
depends_on "xcodegen" | ||
|
||
def install | ||
# Not including the `target/` base dir. Brew auto opens the top level directory. | ||
if Hardware::CPU.intel? | ||
bin.install "x86_64-apple-darwin/release/parra" | ||
elsif Hardware::CPU.arm? | ||
bin.install "aarch64-apple-darwin/release/parra" | ||
end | ||
end | ||
end |