File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ class GitPagesCli < Formula
2+ desc "Tool for publishing a site to a git-pages server"
3+ homepage "https://codeberg.org/git-pages/git-pages-cli"
4+ url "https://codeberg.org/git-pages/git-pages-cli/archive/v1.5.1.tar.gz"
5+ sha256 "e4c26db1de705b3a5c9d486b5d6fbccda88db29470a4d497abfaec12b62bbcd9"
6+ license "0BSD"
7+ head "https://codeberg.org/git-pages/git-pages-cli.git" , branch : "main"
8+
9+ bottle do
10+ sha256 cellar : :any_skip_relocation , arm64_tahoe : "b57bf1db4a6904066cfeff95489d237ec691d5dfaa9af45cd4a5ec5623c107f8"
11+ sha256 cellar : :any_skip_relocation , arm64_sequoia : "b57bf1db4a6904066cfeff95489d237ec691d5dfaa9af45cd4a5ec5623c107f8"
12+ sha256 cellar : :any_skip_relocation , arm64_sonoma : "b57bf1db4a6904066cfeff95489d237ec691d5dfaa9af45cd4a5ec5623c107f8"
13+ sha256 cellar : :any_skip_relocation , sonoma : "4c8c8b9aa133bf138469ee799d4e040565a08b1f53285c7fbf49dab9b59733f0"
14+ sha256 cellar : :any_skip_relocation , arm64_linux : "7184e911920c6d74d6d61b19673ad4307f5ec19c71bb94c41d93d87cba3f3256"
15+ sha256 cellar : :any_skip_relocation , x86_64_linux : "856e2ab8c6a471595bb45d4b0602f0419d3edc2579eb65438f518c08f2b903db"
16+ end
17+
18+ depends_on "go" => :build
19+
20+ def install
21+ ldflags = %W[
22+ -s -w
23+ -X main.versionOverride=#{ version }
24+ ]
25+ system "go" , "build" , *std_go_args ( ldflags :)
26+ end
27+
28+ test do
29+ assert_match version . to_s , shell_output ( "#{ bin } /git-pages-cli --version" )
30+
31+ output = shell_output ( "#{ bin } /git-pages-cli https://example.org --challenge 2>&1" )
32+ assert_match "_git-pages-challenge.example.org" , output
33+ end
34+ end
You can’t perform that action at this time.
0 commit comments