template / files / HomebrewFormula / template.rb
template.rb
77405b97 2023-01-29 Pavel Safronov | 1 | # typed: false |
| 2 | # frozen_string_literal: true | |
| 3 | ||
| 4 | # This file was generated by GoReleaser. DO NOT EDIT. | |
| 5 | class Template < Formula | |
| 6 | desc "This CLI creates files and folders with generated templated names and content." | |
f4e7b187 2023-01-31 Pavel Safronov | 7 | homepage "https://gitlab.com/PavelSafronov/template" |
4137df01 2026-02-01 Pavel Safronov | 8 | version "0.2.6" |
77405b97 2023-01-29 Pavel Safronov | 9 | license "MIT" |
| 10 | ||
| 11 | on_macos do | |
8514c394 2023-02-18 Pavel Safronov | 12 | if Hardware::CPU.intel? |
4137df01 2026-02-01 Pavel Safronov | 13 | url "https://gitlab.com/PavelSafronov/template/-/releases/v0.2.6/downloads/template_0.2.6_darwin_amd64.tar.gz" |
| 14 | sha256 "d6832f8f2cf48b163e9f26bb79ff9c7bf4638ac00603945c698a4946e9249c48" | |
77405b97 2023-01-29 Pavel Safronov | 15 | |
| 16 | def install | |
| 17 | bin.install "template" | |
| 18 | end | |
| 19 | end | |
8514c394 2023-02-18 Pavel Safronov | 20 | if Hardware::CPU.arm? |
4137df01 2026-02-01 Pavel Safronov | 21 | url "https://gitlab.com/PavelSafronov/template/-/releases/v0.2.6/downloads/template_0.2.6_darwin_arm64.tar.gz" |
| 22 | sha256 "bfa375452c1ad065c3cb67752933f09e37ac454174152bf51a5e2a54d0796e22" | |
77405b97 2023-01-29 Pavel Safronov | 23 | |
| 24 | def install | |
| 25 | bin.install "template" | |
| 26 | end | |
| 27 | end | |
| 28 | end | |
| 29 | ||
| 30 | on_linux do | |
4137df01 2026-02-01 Pavel Safronov | 31 | if Hardware::CPU.intel? && Hardware::CPU.is_64_bit? |
| 32 | url "https://gitlab.com/PavelSafronov/template/-/releases/v0.2.6/downloads/template_0.2.6_linux_amd64.tar.gz" | |
| 33 | sha256 "61aed0210b2f82f252b12f014ca08045f16b1892d1929aacb73b4f89d38eacd3" | |
77405b97 2023-01-29 Pavel Safronov | 34 | def install |
| 35 | bin.install "template" | |
| 36 | end | |
| 37 | end | |
4137df01 2026-02-01 Pavel Safronov | 38 | if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? |
| 39 | url "https://gitlab.com/PavelSafronov/template/-/releases/v0.2.6/downloads/template_0.2.6_linux_arm64.tar.gz" | |
| 40 | sha256 "fb8bfd4a2fc1d408cfd11fe9e8bd85417936a897c7ab84ec74c74c34f0373b72" | |
77405b97 2023-01-29 Pavel Safronov | 41 | def install |
| 42 | bin.install "template" | |
| 43 | end | |
| 44 | end | |
| 45 | end | |
| 46 | ||
| 47 | def post_install | |
4137df01 2026-02-01 Pavel Safronov | 48 | system "#{bin}/template init" |
77405b97 2023-01-29 Pavel Safronov | 49 | end |
| 50 | ||
| 51 | def caveats | |
| 52 | <<~EOS | |
6bc452c2 2023-01-31 Pavel Safronov | 53 | How to use this binary: https://gitlab.com/PavelSafronov/template/-/blob/main/README.md |
77405b97 2023-01-29 Pavel Safronov | 54 | EOS |
| 55 | end | |
| 56 | ||
| 57 | test do | |
| 58 | system "#{bin}/template --version" | |
| 59 | end | |
| 60 | end |