Skip to content

Commit

Permalink
set version via goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
damoon committed Jan 10, 2022
1 parent c25fabd commit f7dac66
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func main() {
return d8s.Down(ctx, allowContext)
}
version := func(c *cli.Context) error {
return d8s.Version()
return Version()
}

app := &cli.App{
Expand Down
19 changes: 0 additions & 19 deletions pkg/version.go

This file was deleted.

20 changes: 20 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package main

import (
"fmt"
)

var (
version string
commit string
date string
)

func Version() error {
_, err := fmt.Printf("version: %s\ncommit: %s\nbuilt at: %s\n", version, commit, date)
if err != nil {
return err
}

return nil
}

0 comments on commit f7dac66

Please sign in to comment.