fix(croc)

set version var

closes #5135
This commit is contained in:
Jacob Heider 2024-02-07 10:32:17 -05:00
parent 5133243391
commit 63b4f81234
No known key found for this signature in database
GPG key ID: 51E3FD0EE62677B6

View file

@ -1,20 +1,32 @@
distributable:
url: https://github.com/schollz/croc/archive/v{{version}}.tar.gz
strip-components: 1
versions:
github: schollz/croc
build:
dependencies:
go.dev: '*'
script:
- go build $ARGS -ldflags="-s -w"
- go build $ARGS -ldflags="$GO_LDFLAGS"
env:
ARGS:
- -trimpath
- -o={{prefix}}/bin/croc
GO_LDFLAGS:
- -s
- -w
- -X github.com/schollz/croc/v{{version.major}}/src/cli.Version={{version}}
linux:
ARGS:
- -asan
GO_LDFLAGS:
- -buildmode=pie
provides:
- bin/croc
test: croc --version | grep {{version}}
test:
- croc --version
- croc --version | grep {{version}}