chore(version): set CLI version from lib
Former-commit-id: 687a0a5f65c1e246110f11832a74aff227aea9b1 [formerly 6066fdbdd709de04a8362868084f70fb04a24c66] [formerly c29860d9846fe01aadffd393753265294749fc3f [formerly 0c53f06c64
]]
Former-commit-id: cc10a50da0a49f97455a59a7e6e8145460168407 [formerly ea1aae8d790840e5ac7e86556f59316b476b1218]
Former-commit-id: ccc7c07a75dffcd5306a537bef2a5dce8a8f6051
pull/726/head
parent
7d912dd257
commit
679b0f0f4e
|
@ -11,7 +11,7 @@ if [ "$COMMIT_SHA" != "" ]; then
|
||||||
sed -i.bak "s|(untracked)|($COMMIT_SHA)|g" ../lib/filebrowser.go
|
sed -i.bak "s|(untracked)|($COMMIT_SHA)|g" ../lib/filebrowser.go
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Build cmd/filebrowser"
|
echo "Build CLI"
|
||||||
CGO_ENABLED=0 go build -a -o filebrowser
|
CGO_ENABLED=0 go build -a -o filebrowser
|
||||||
|
|
||||||
if [ "$COMMIT_SHA" != "" ]; then
|
if [ "$COMMIT_SHA" != "" ]; then
|
||||||
|
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
fb "github.com/filebrowser/filebrowser/lib"
|
||||||
homedir "github.com/mitchellh/go-homedir"
|
homedir "github.com/mitchellh/go-homedir"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
v "github.com/spf13/viper"
|
v "github.com/spf13/viper"
|
||||||
|
@ -14,7 +15,7 @@ var cfgFile string
|
||||||
// rootCmd represents the base command when called without any subcommands
|
// rootCmd represents the base command when called without any subcommands
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "filebrowser",
|
Use: "filebrowser",
|
||||||
Version: "(untracked)",
|
Version: fb.Version,
|
||||||
Aliases: []string{"serve"},
|
Aliases: []string{"serve"},
|
||||||
Short: "A stylish web-based file manager",
|
Short: "A stylish web-based file manager",
|
||||||
Long: `Command 'serve' is the default. Filebrowser is started
|
Long: `Command 'serve' is the default. Filebrowser is started
|
||||||
|
|
Loading…
Reference in New Issue