Skip to content

Commit

Permalink
Merge pull request #6 from hionay/fix/goreleaser
Browse files Browse the repository at this point in the history
Fix archive names
  • Loading branch information
hionay authored Jul 1, 2023
2 parents ad38fae + bdd3233 commit f8e78ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
9 changes: 3 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ builds:
archives:
- format: tar.gz
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else }}{{ .Os }}{{ end }}_{{ .Arch }}
format_overrides:
- goos: windows
format: zip
Expand Down
10 changes: 5 additions & 5 deletions cmd/tailer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func main() {
Commands: []*cli.Command{
{
Name: commandExec,
Usage: "execute a command and tail its output",
Usage: "Execute a command and tail its output",
Before: func(c *cli.Context) error {
if c.NArg() == 0 {
return errors.New("arguments cannot be empty")
Expand Down Expand Up @@ -128,10 +128,10 @@ func execAction(c *cli.Context) error {
return tl.Run(c.Context)
}

func parseCommand(first string) (string, []string) {
if strings.Contains(first, " ") {
split := strings.Split(first, " ")
func parseCommand(args string) (string, []string) {
if strings.Contains(args, " ") {
split := strings.Split(args, " ")
return split[0], split[1:]
}
return first, nil
return args, nil
}

0 comments on commit f8e78ed

Please sign in to comment.