2024-01-17 18:17:14 +03:00
|
|
|
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:
|
2024-05-16 00:07:06 +03:00
|
|
|
go.dev: ^1.22.2
|
2024-01-17 18:17:14 +03:00
|
|
|
env:
|
|
|
|
CGO_ENABLED: 0
|
2024-05-16 00:07:06 +03:00
|
|
|
COMMIT_SHA: '$(git describe --always --abbrev=8 --dirty)'
|
|
|
|
VERSION_DATE: '$(date -u +%FT%TZ)'
|
2024-01-17 18:17:14 +03:00
|
|
|
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:
|
|
|
|
LDFLAGS:
|
|
|
|
- -buildmode=pie
|
2024-05-16 00:07:06 +03:00
|
|
|
script:
|
|
|
|
# fails to find sqlite3.Error
|
|
|
|
- run: TAGS="-tags nosqlite"
|
|
|
|
if: 2.6.0
|
|
|
|
- go build -v $TAGS -trimpath -ldflags="${LDFLAGS}" -o {{prefix}}/bin/sftpgo
|
2024-01-17 18:17:14 +03:00
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/sftpgo
|
|
|
|
|
|
|
|
test: test "$(sftpgo --version | cut -d' ' -f2 | cut -d'-' -f1)" = {{version}}
|