fix build with some features disabled

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2022-12-04 09:24:21 +01:00
parent 0f74c077ac
commit 9ba468698b
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF
5 changed files with 10 additions and 6 deletions

View file

@ -222,8 +222,8 @@ jobs:
name: sftpgo-${{ matrix.os }}-go-${{ matrix.go }}
path: output
test-bundle:
name: Build in bundle mode
test-build-flags:
name: Test build flags
runs-on: ubuntu-latest
steps:
@ -236,6 +236,8 @@ jobs:
- name: Build
run: |
go build -trimpath -tags nopgxregisterdefaulttypes,nogcs,nos3,noportable,nobolt,nomysql,nopgsql,nosqlite,nometrics,noazblob -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/internal/internal/version.commit=`git describe --always --abbrev=8 --dirty` -X github.com/drakkan/sftpgo/v2/internal/version.date=`date -u +%FT%TZ`" -o sftpgo
./sftpgo -v
cp -r openapi static templates internal/bundle/
go build -trimpath -tags nopgxregisterdefaulttypes,bundle -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/internal/version.commit=`git describe --always --abbrev=8 --dirty` -X github.com/drakkan/sftpgo/v2/internal/version.date=`date -u +%FT%TZ`" -o sftpgo
./sftpgo -v

View file

@ -54,7 +54,6 @@ import (
const (
azureDefaultEndpoint = "blob.core.windows.net"
azBlobFsName = "AzureBlobFs"
azFolderKey = "hdi_isfolder"
)

View file

@ -45,7 +45,6 @@ import (
const (
defaultGCSPageSize = 5000
gcsfsName = "GCSFs"
)
var (

View file

@ -57,7 +57,6 @@ const (
// using this mime type for directories improves compatibility with s3fs-fuse
s3DirMimeType = "application/x-directory"
s3TransferBufferSize = 256 * 1024
s3fsName = "S3Fs"
)
var (

View file

@ -38,7 +38,12 @@ import (
"github.com/drakkan/sftpgo/v2/internal/util"
)
const dirMimeType = "inode/directory"
const (
dirMimeType = "inode/directory"
s3fsName = "S3Fs"
gcsfsName = "GCSFs"
azBlobFsName = "AzureBlobFs"
)
var (
validAzAccessTier = []string{"", "Archive", "Hot", "Cool"}