mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
fix(cfsauto): fix build time for -V option
Signed-off-by: Till <lleiiell@live.com>
This commit is contained in:
parent
31797d462a
commit
dbea75ee76
@ -5,7 +5,7 @@ automount tool for [cubefs](https://github.com/cubefs/cubefs)
|
||||
## build
|
||||
|
||||
```bash
|
||||
go build -v -ldflags="-X main.buildVersion=1.1" -o /usr/local/bin
|
||||
go build -v -ldflags="-X main.buildVersion=1.1 -X 'main.buildDate=$(date '+%Y-%m-%d %H:%M:%S')'" -o /usr/local/bin
|
||||
```
|
||||
|
||||
## quick start
|
||||
@ -23,6 +23,12 @@ cfsauto
|
||||
|
||||
cfsauto -V
|
||||
|
||||
example:
|
||||
|
||||
```bash
|
||||
Version: 1.1, BuildDate: 2023-05-18 15:08:00
|
||||
```
|
||||
|
||||
|
||||
## LDAP automount example
|
||||
|
||||
|
||||
@ -5,11 +5,10 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
var buildVersion = "DebugVersion"
|
||||
var buildDate = time.Now().String()
|
||||
var buildDate = "BuildDate"
|
||||
|
||||
var logFile *os.File
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user