fix(sftpgo)

closes #6461
This commit is contained in:
Jacob Heider 2024-06-19 12:43:42 -04:00 committed by Jacob Heider
parent 8db6e16ca6
commit 718d6e4461

View file

@ -10,24 +10,24 @@ versions:
build: build:
dependencies: dependencies:
go.dev: ^1.22.2 go.dev: =1.22.2
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 1
COMMIT_SHA: '$(git describe --always --abbrev=8 --dirty)' COMMIT_SHA: '$(git describe --always --abbrev=8 --dirty)'
VERSION_DATE: '$(date -u +%FT%TZ)' VERSION_DATE: '$(date -u +%FT%TZ)'
LDFLAGS: GO_LDFLAGS:
- -s - -s
- -w - -w
- -X github.com/drakkan/sftpgo/v2/internal/version.commit=${COMMIT_SHA} - -X github.com/drakkan/sftpgo/v2/internal/version.commit=${COMMIT_SHA}
- -X github.com/drakkan/sftpgo/v2/internal/version.date=${VERSION_DATE} - -X github.com/drakkan/sftpgo/v2/internal/version.date=${VERSION_DATE}
linux: linux:
LDFLAGS: GO_LDFLAGS:
- -buildmode=pie - -buildmode=pie
script: script:
# fails to find sqlite3.Error # fails to find sqlite3.Error
- run: TAGS="-tags nosqlite" - run: TAGS="-tags nosqlite"
if: 2.6.0 if: 2.6.0
- go build -v $TAGS -trimpath -ldflags="${LDFLAGS}" -o {{prefix}}/bin/sftpgo - go build -v $TAGS -trimpath -ldflags="${GO_LDFLAGS}" -o {{prefix}}/bin/sftpgo
provides: provides:
- bin/sftpgo - bin/sftpgo