Skip to content

Commit

Permalink
fix: update goreleaser for go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
connerdouglass committed Jun 25, 2024
1 parent 55c959f commit 41b334a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions cmd/cmd_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
6 changes: 6 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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."`
Expand Down
4 changes: 0 additions & 4 deletions pkg/version/version.go

This file was deleted.

0 comments on commit 41b334a

Please sign in to comment.