File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -225,8 +225,9 @@ func init() {
225
225
}
226
226
227
227
var (
228
- buildDate string // date -u '+%Y-%m-%d'
229
- commitHash string // git rev-parse HEAD
228
+ buildTag = "dev" // v#.#.#
229
+ buildDate = "unknown" // date -u '+%Y-%m-%d'
230
+ commitHash = "unknown" // git rev-parse HEAD
230
231
)
231
232
232
233
func main () {
@@ -237,14 +238,9 @@ func main() {
237
238
rcvr .HandleFlags ()
238
239
239
240
if * version {
240
- if buildDate == "" || commitHash == "" {
241
- fmt .Println ("Built from source." )
242
- fmt .Println ("Build Date: Unknown" )
243
- fmt .Println ("Commit: Unknown" )
244
- } else {
245
- fmt .Println ("Build Date:" , buildDate )
246
- fmt .Println ("Commit: " , commitHash )
247
- }
241
+ fmt .Println ("Build Tag: " , buildTag )
242
+ fmt .Println ("Build Date:" , buildDate )
243
+ fmt .Println ("Commit: " , commitHash )
248
244
os .Exit (0 )
249
245
}
250
246
You can’t perform that action at this time.
0 commit comments