Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
More grooming
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmalkmus committed Aug 8, 2021
1 parent bdaf5d5 commit 1ca3aaf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ brews:
install: |
bin.install "{{ .ProjectName }}"
test: |
assert_match "Horcrux version #{version}", shell_output("#{bin}/{{ .ProjectName }} -v")
assert_match "horcrux version #{version}", shell_output("#{bin}/{{ .ProjectName }} -v")
dockers:
- ids:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ $(COVERPROFILE):

# INSTALL TARGETS

$(GOPATH)/bin/horcrux: dep.stamp $(call go-pkg-sourcefiles, ./...)
$(GOPATH)/bin/horcrux: dep.stamp $(call go-pkg-sourcefiles, ./cmd/horcrux)
@echo ">> installing horcrux binary"
@$(GO_BIN_IN_PATH) install $(GOFLAGS) ./cmd/horcrux
@$(GO_BIN_IN_PATH) install $(GO_FLAGS) ./cmd/horcrux

# TOOLS

Expand Down
4 changes: 4 additions & 0 deletions cmd/horcrux/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"strings"

"github.com/axiomhq/pkg/version"
"github.com/golang/snappy"
"github.com/manifoldco/promptui"
"github.com/spf13/cobra"
Expand All @@ -26,6 +27,9 @@ utility. Yes, the name is inspired by Harry Potter.

func main() {
rootCmd.SilenceUsage = true
rootCmd.Flags().BoolP("version", "v", false, "Show horcrux version")
rootCmd.SetVersionTemplate("{{ .Use }} version {{ .Version }}\n")
rootCmd.Version = version.Release()

if err := rootCmd.Execute(); err != nil {
os.Exit(1)
Expand Down

0 comments on commit 1ca3aaf

Please sign in to comment.