File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,14 @@ package main
3
3
import (
4
4
"context"
5
5
"flag"
6
+ "fmt"
6
7
"log"
7
8
"path/filepath"
8
9
"time"
9
10
10
11
"cloud.google.com/go/firestore"
11
12
_ "github.com/BurntSushi/toml"
13
+ "github.com/go-generalize/fti/common"
12
14
"github.com/go-generalize/fti/pkg/config"
13
15
"github.com/go-generalize/fti/pkg/files"
14
16
"github.com/go-generalize/fti/pkg/inserter"
@@ -21,12 +23,18 @@ import (
21
23
)
22
24
23
25
var (
24
- configPath = flag .String ("c" , "config.yaml" , "-c config.yaml" )
26
+ configPath = flag .String ("c" , "config.yaml" , "-c config.yaml" )
27
+ versionFlag = flag .Bool ("v" , false , "show version" )
25
28
)
26
29
27
30
func main () {
28
31
flag .Parse ()
29
32
33
+ if * versionFlag {
34
+ fmt .Println (common .AppVersion )
35
+ return
36
+ }
37
+
30
38
if ! files .Exists (* configPath ) {
31
39
configFullPath , _ := filepath .Abs (* configPath )
32
40
log .Fatalf ("not found configuration file: %s" , configFullPath )
Original file line number Diff line number Diff line change
1
+ // Package common ...
2
+ package common
3
+
4
+ // AppVersion is a version number for this module.
5
+ var AppVersion = "devel"
You can’t perform that action at this time.
0 commit comments