diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 93d465f..1fe3345 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -15,10 +15,8 @@ builds: - linux - windows - darwin - main: ./cmd/main.go + main: ./cmd binary: crx - ldflags: - - -s -w -X github.com/customrealms/cli/pkg/version.Version={{.Version}} archives: - format: tar.gz diff --git a/cmd/cmd_version.go b/cmd/cmd_version.go index 8113afe..8c84509 100644 --- a/cmd/cmd_version.go +++ b/cmd/cmd_version.go @@ -2,13 +2,11 @@ package main import ( "fmt" - - "github.com/customrealms/cli/pkg/version" ) type VersionCmd struct{} func (c *VersionCmd) Run() error { - fmt.Printf("@customrealms/cli (crx) v%s\n", version.Version) + fmt.Printf("@customrealms/cli (crx) v%s\n", version) return nil } diff --git a/cmd/main.go b/cmd/main.go index 4027766..3b0449c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -11,6 +11,12 @@ import ( "github.com/customrealms/cli/internal/minecraft" ) +var ( + version = "dev" + // commit = "none" + // date = "unknown" +) + var cli struct { VersionCmd VersionCmd `cmd:"" name:"version" help:"Show the version of the CLI."` InitCmd InitCmd `cmd:"" name:"init" help:"Initialize a new plugin project."` diff --git a/pkg/version/version.go b/pkg/version/version.go deleted file mode 100644 index cfac9a3..0000000 --- a/pkg/version/version.go +++ /dev/null @@ -1,4 +0,0 @@ -package version - -// Version is the current version of the CLI. This is set at build time. -var Version string