pantry/projects/templ.guide/package.yml

30 lines
634 B
YAML
Raw Permalink Normal View History

2023-12-17 18:16:38 +03:00
distributable:
2024-05-20 17:18:44 +03:00
url: https://github.com/a-h/templ/archive/refs/tags/{{version.tag}}.tar.gz
2023-12-17 18:16:38 +03:00
strip-components: 1
versions:
github: a-h/templ
build:
dependencies:
go.dev: ^1.20
env:
CGO_ENABLED: 0
LDFLAGS:
- -extldflags=-static
- -w
- -s
script:
2024-05-20 17:18:44 +03:00
- echo -n {{ version }} >.version
- go build -v -ldflags="$LDFLAGS" -o "{{ prefix }}"/bin/templ ./cmd/templ
2023-12-17 18:16:38 +03:00
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