pantry/projects/sftpgo.com/package.yml
Jacob Heider 718d6e4461 fix(sftpgo)
closes #6461
2024-06-19 12:49:40 -04:00

36 lines
890 B
YAML

distributable:
url: https://github.com/drakkan/sftpgo/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
display-name: sftpgo
versions:
github: drakkan/sftpgo
strip: /^v/
build:
dependencies:
go.dev: =1.22.2
env:
CGO_ENABLED: 1
COMMIT_SHA: '$(git describe --always --abbrev=8 --dirty)'
VERSION_DATE: '$(date -u +%FT%TZ)'
GO_LDFLAGS:
- -s
- -w
- -X github.com/drakkan/sftpgo/v2/internal/version.commit=${COMMIT_SHA}
- -X github.com/drakkan/sftpgo/v2/internal/version.date=${VERSION_DATE}
linux:
GO_LDFLAGS:
- -buildmode=pie
script:
# fails to find sqlite3.Error
- run: TAGS="-tags nosqlite"
if: 2.6.0
- go build -v $TAGS -trimpath -ldflags="${GO_LDFLAGS}" -o {{prefix}}/bin/sftpgo
provides:
- bin/sftpgo
test: test "$(sftpgo --version | cut -d' ' -f2 | cut -d'-' -f1)" = {{version}}