|
@@ -11,12 +11,13 @@ Make sure [Git](https://git-scm.com/downloads) is installed on your machine and
|
|
The following build tags are available:
|
|
The following build tags are available:
|
|
|
|
|
|
- `nogcs`, disable Google Cloud Storage backend, default enabled
|
|
- `nogcs`, disable Google Cloud Storage backend, default enabled
|
|
-- `nos3`, disable S3 Compabible Object Storage backends, , default enabled
|
|
|
|
-- `nobolt`, disable Bolt data provider, , default enabled
|
|
|
|
|
|
+- `nos3`, disable S3 Compabible Object Storage backends, default enabled
|
|
|
|
+- `nobolt`, disable Bolt data provider, default enabled
|
|
- `nomysql`, disable MySQL data provider, default enabled
|
|
- `nomysql`, disable MySQL data provider, default enabled
|
|
- `nopgsql`, disable PostgreSQL data provider, default enabled
|
|
- `nopgsql`, disable PostgreSQL data provider, default enabled
|
|
- `nosqlite`, disable SQLite data provider, default enabled
|
|
- `nosqlite`, disable SQLite data provider, default enabled
|
|
- `noportable`, disable portable mode, default enabled
|
|
- `noportable`, disable portable mode, default enabled
|
|
|
|
+- `nometrics`, disable Prometheus metrics, default enabled
|
|
|
|
|
|
If no build tag is specified the build will include the default features.
|
|
If no build tag is specified the build will include the default features.
|
|
|
|
|
|
@@ -27,18 +28,18 @@ The compiler is a build time only dependency. It is not required at runtime.
|
|
|
|
|
|
Version info, such as git commit and build date, can be embedded setting the following string variables at build time:
|
|
Version info, such as git commit and build date, can be embedded setting the following string variables at build time:
|
|
|
|
|
|
-- `github.com/drakkan/sftpgo/utils.commit`
|
|
|
|
-- `github.com/drakkan/sftpgo/utils.date`
|
|
|
|
|
|
+- `github.com/drakkan/sftpgo/version.commit`
|
|
|
|
+- `github.com/drakkan/sftpgo/version.date`
|
|
|
|
|
|
For example, you can build using the following command:
|
|
For example, you can build using the following command:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
-go build -i -tags nogcs,nos3,nosqlite -ldflags "-s -w -X github.com/drakkan/sftpgo/utils.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/utils.date=`date -u +%FT%TZ`" -o sftpgo
|
|
|
|
|
|
+go build -i -tags nogcs,nos3,nosqlite -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
|
```
|
|
```
|
|
|
|
|
|
You should get a version that includes git commit, build date and available features like this one:
|
|
You should get a version that includes git commit, build date and available features like this one:
|
|
|
|
|
|
```bash
|
|
```bash
|
|
$ ./sftpgo -v
|
|
$ ./sftpgo -v
|
|
-SFTPGo 0.9.6-dev-15298b0-dirty-2020-05-22T21:25:51Z -gcs -s3 +bolt +mysql +pgsql -sqlite +portable
|
|
|
|
|
|
+SFTPGo 0.9.6-dev-b30614e-dirty-2020-06-19T11:04:56Z +metrics -gcs -s3 +bolt +mysql +pgsql -sqlite +portable
|
|
```
|
|
```
|