File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ profanity.txt
77# Local scripts
88* .sh
99* .bat
10+ ! build.sh
1011
1112# Logs
1213logs
Original file line number Diff line number Diff line change 1+ go build -ldflags " -X main.version=$( git rev-parse --short HEAD) "
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package main
22
33import (
44 "errors"
5+ "fmt"
56 "io"
67 "net"
78 "net/rpc"
@@ -31,7 +32,8 @@ import (
3132)
3233
3334var (
34- config = common .GetConfig ()
35+ config = common .GetConfig ()
36+ version string
3537)
3638
3739func main () {
@@ -44,6 +46,14 @@ func main() {
4446 noSignal := false
4547 noReload := false
4648
49+ for _ , arg := range args {
50+ switch arg {
51+ case "--version" , "-v" :
52+ fmt .Printf ("wfc-server commit %s\n " , version )
53+ os .Exit (0 )
54+ }
55+ }
56+
4757 if len (args ) > 1 {
4858 for _ , arg := range args [1 :] {
4959 switch arg {
You can’t perform that action at this time.
0 commit comments