pantry/projects/templ.guide/package.yml

32 lines
656 B
YAML
Raw Normal View History

2023-12-17 18:16:38 +03:00
distributable:
url: https://github.com/a-h/templ/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: a-h/templ
strip: /^v/
build:
dependencies:
go.dev: ^1.20
env:
CGO_ENABLED: 0
LDFLAGS:
- -extldflags=-static
- -w
- -s
script:
- go build -v -ldflags="$LDFLAGS" -o templ ./cmd/templ
- mkdir -p "{{ prefix }}"/bin
- mv templ "{{ prefix }}"/bin
provides:
- bin/templ
test:
script:
2023-12-22 20:06:25 +03:00
# some versions have a v prefix, some don't
- test "$(templ --version)" = {{version}} || test "$(templ --version)" = "v{{version}}"
2023-12-17 18:16:38 +03:00
- templ generate
- test -f hello_templ.go