mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
+github.com/mvdan/sh
This commit is contained in:
parent
c577e315c9
commit
2dc39b4d51
31
projects/github.com/mvdan/sh/package.yml
Normal file
31
projects/github.com/mvdan/sh/package.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
distributable:
|
||||
url: https://github.com/mvdan/sh/archive/refs/tags/v{{version}}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: mvdan/sh/releases/tags
|
||||
strip: /^v/
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
go.dev: ^1.19
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
LDFLAGS:
|
||||
- -s
|
||||
- -w
|
||||
- -extldflags=-static
|
||||
- -X main.version={{version}}
|
||||
script: |
|
||||
go build -v -ldflags="$LDFLAGS" -o "{{ prefix }}"/bin/gosh ./cmd/gosh
|
||||
go build -v -ldflags="$LDFLAGS" -o "{{ prefix }}"/bin/shfmt ./cmd/shfmt
|
||||
|
||||
provides:
|
||||
- bin/gosh
|
||||
- bin/shfmt
|
||||
|
||||
test:
|
||||
script: |
|
||||
test "$(gosh -c 'echo success')" = success
|
||||
test "$(shfmt --version)" = {{version}}
|
||||
echo "f() { true; }" | shfmt --diff -
|
Loading…
Reference in a new issue