add do-release script and injection of version
This commit is contained in:
parent
6220d4d71e
commit
5e2573a992
13
cmd/dsnet.go
13
cmd/dsnet.go
@ -50,13 +50,18 @@ Usage: dsnet <cmd>
|
|||||||
|
|
||||||
Available commands:
|
Available commands:
|
||||||
|
|
||||||
init : Create %s containing default configuration + new keys without loading. Edit to taste.
|
init : Create %[1]s containing default configuration + new keys without loading. Edit to taste.
|
||||||
add : Add a new peer + sync
|
add : Add a new peer + sync
|
||||||
up : Create the interface, run pre/post up, sync
|
up : Create the interface, run pre/post up, sync
|
||||||
report : Generate a JSON status report to the location configured in %s.
|
report : Generate a JSON status report to the location configured in %[1]s.
|
||||||
remove : Remove a peer by hostname provided as argument + sync
|
remove : Remove a peer by hostname provided as argument + sync
|
||||||
down : Destroy the interface, run pre/post down
|
down : Destroy the interface, run pre/post down
|
||||||
sync : Update wireguard configuration from %s after validating
|
sync : Update wireguard configuration from %[1]s after validating
|
||||||
|
|
||||||
`, dsnet.CONFIG_FILE, dsnet.CONFIG_FILE, dsnet.CONFIG_FILE)
|
|
||||||
|
dsnet version %[2]s
|
||||||
|
commit %[3]s
|
||||||
|
built %[4]s
|
||||||
|
|
||||||
|
`, dsnet.CONFIG_FILE, dsnet.VERSION, dsnet.GIT_COMMIT, dsnet.BUILD_DATE)
|
||||||
}
|
}
|
||||||
|
7
const.go
7
const.go
@ -24,3 +24,10 @@ const (
|
|||||||
// when is a peer considered gone forever? (could remove)
|
// when is a peer considered gone forever? (could remove)
|
||||||
EXPIRY = 28 * time.Hour * 24
|
EXPIRY = 28 * time.Hour * 24
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
// populated with LDFLAGS, see do-release.sh
|
||||||
|
VERSION = "unknown"
|
||||||
|
GIT_COMMIT = "unknown"
|
||||||
|
BUILD_DATE = "unknown"
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user