diff --git a/cmd/root.go b/cmd/root.go index 8465d86b..c0f9ef9d 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -97,7 +97,7 @@ var versionCmd = &cobra.Command{ Use: "version", Short: "Print the version number", Run: func(cmd *cobra.Command, args []string) { - fmt.Println("File Browser Version (UNTRACKED)") + fmt.Println("File Browser Version " + types.Version) }, } diff --git a/types/files.go b/types/files.go index 3bdc2876..7293bed1 100644 --- a/types/files.go +++ b/types/files.go @@ -18,6 +18,11 @@ import ( "github.com/spf13/afero" ) +const ( + // Version is the current File Browser version. + Version = "(untracked)" +) + // File describes a file. type File struct { *Listing