-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add Homebrew formula and template
- Loading branch information
Showing
4 changed files
with
41 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,9 @@ | ||
You may test your template/data with: | ||
|
||
c watch -i Formula/tera.rb -s "tera -t Formula/template.tera Formula/data.yaml -o Formula/tera.rb" | ||
|
||
and render with: | ||
|
||
tera -t Formula/template.tera Formula/data.yaml -o Formula/tera.rb | ||
|
||
NOTE: The template covers a few default values so you don't need to pass everything. |
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,7 @@ | ||
name: Tera | ||
site: https://github.com | ||
repo: chevdor/tera-cli | ||
archive: "{{ name }}-mac-v1.2.3.tar.gz" | ||
description: A command line utility written in Rust to render templates using the tera templating engine | ||
version: 1.2.3 | ||
sha256: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b |
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,14 @@ | ||
{% set bin = bin | default(value=name | lower) %} | ||
{%- set homepage = homepage | default(value=site ~ "/" ~ repo) -%} | ||
|
||
class {{ name }} < Formula | ||
desc "{{ description }}" | ||
homepage "{{ homepage}}" | ||
url "{{ site }}/{{ repo }}/releases/download/v{{ version}}/{{ archive | default(value= bin ~"-mac-v" ~ version) }}.tar.gz " | ||
sha256 "{{ sha256 }}" | ||
version "{{ version }}" | ||
|
||
def install | ||
bin.install "{{ bin }}" | ||
end | ||
end |
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,11 @@ | ||
class Tera < Formula | ||
desc "A command line utility written in Rust to render templates using the tera templating engine" | ||
homepage "https://github.com/chevdor/tera-cli" | ||
url "https://github.com/chevdor/tera-cli/releases/download/v1.2.3/{{ name }}-mac-v1.2.3.tar.gz.tar.gz " | ||
sha256 "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b" | ||
version "1.2.3" | ||
|
||
def install | ||
bin.install "tera" | ||
end | ||
end |