mirror of
https://github.com/yarlson/lnk.git
synced 2025-09-01 18:02:34 +02:00
feat: implement CI/CD pipeline and release automation
This commit is contained in:
12
cmd/root.go
12
cmd/root.go
@@ -7,12 +7,24 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
version = "dev"
|
||||
buildTime = "unknown"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "lnk",
|
||||
Short: "Dotfiles, linked. No fluff.",
|
||||
Long: "Lnk is a minimalist CLI tool for managing dotfiles using symlinks and Git.",
|
||||
}
|
||||
|
||||
// SetVersion sets the version information for the CLI
|
||||
func SetVersion(v, bt string) {
|
||||
version = v
|
||||
buildTime = bt
|
||||
rootCmd.Version = fmt.Sprintf("%s (built %s)", version, buildTime)
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
Reference in New Issue
Block a user