mirror of
https://github.com/danog/gojekyll.git
synced 2024-11-26 23:34:47 +01:00
19 lines
368 B
Go
19 lines
368 B
Go
package commands
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/osteele/gojekyll/version"
|
|
)
|
|
|
|
var versionCmd = app.Command("version", "Print the name and version")
|
|
|
|
func versionCommand() error {
|
|
var d string
|
|
if !version.BuildTime.IsZero() {
|
|
d = version.BuildTime.Format(" (Build time: 2006-01-02T15:04)")
|
|
}
|
|
fmt.Printf("gojekyll version %s%s\n", version.Version, d)
|
|
return nil
|
|
}
|