This commit is contained in:
Florian Baumann 2022-03-07 13:19:13 +01:00
parent e253af27b3
commit bb54b5ce88
3 changed files with 7 additions and 6 deletions

View File

@ -5,7 +5,7 @@ version: '3'
tasks:
build:
cmds:
- go build -ldflags "-X serra.version=`git describe --tags`" -v serra.go
- go build -ldflags "-X github.com/noqqe/serra/src/serra.Version=`git describe --tags`" -v serra.go
sources:
- "src/serra/**/*.go"
- "serra.go"

View File

@ -7,20 +7,21 @@ import (
"github.com/spf13/cobra"
)
var version = "unknown"
var Version = "unknown"
var count int64
var limit float64
var rarity, set, sort string
var rootCmd = &cobra.Command{
Version: version,
Long: `serra - Personal Magic: The Gathering Collection Tracker`,
Version: Version,
Long: `serra - Magic: The Gathering Collection Tracker`,
Use: "serra",
DisableFlagsInUseLine: true,
SilenceErrors: true,
}
func Execute() {
Banner()
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)

View File

@ -3,7 +3,7 @@ package serra
import "fmt"
var (
Icon = "\U0001F47C\U0001F3FB" // baby angel serra
Icon = "\U0001F9D9\U0001F3FC"
Reset = "\033[0m"
Background = "\033[38;5;59m"
CurrentLine = "\033[38;5;60m"
@ -19,7 +19,7 @@ var (
)
func Banner() {
LogMessage(fmt.Sprintf("%s Serra %v\n", Icon, version), "green")
LogMessage(fmt.Sprintf("%s Serra %v\n", Icon, Version), "green")
}
// Colored output on commandline