Skip to content

Commit

Permalink
release tools
Browse files Browse the repository at this point in the history
  • Loading branch information
boz committed Apr 26, 2017
1 parent 2fb700a commit 57be118
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ server:
example:
(cd example && go build)

release:
GITHUB_TOKEN=$$GITHUB_REPO_TOKEN goreleaser

.PHONY: build test vet server example
13 changes: 13 additions & 0 deletions goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
build:
main: ephemerald/main.go
binary: ephemerald
goos:
- darwin
- linux
goarch:
- amd64

ldflags: -s -w -X github.com/boz/ephemerald/version.version={{.Version}} -X github.com/boz/ephemerald/version.commit={{.Commit}} -X github.com/boz/ephemerald/version.date={{.Date}}

release:
draft: true
2 changes: 1 addition & 1 deletion ui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func createTuiApp(shutdownch chan bool) (*views.Application, *tuiWindow) {
keybar.SetLeft("%N[%AQ%N] Quit")

keybar.RegisterRightStyle('N', kbstyle)
keybar.SetRight(fmt.Sprintf("%%NEphemerald %v", version.Version))
keybar.SetRight(fmt.Sprintf("%%NEphemerald %v", version.Version()))

app := &views.Application{}

Expand Down
18 changes: 17 additions & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
package version

const Version = "0.3.0"
var (
version = ""
commit = ""
date = ""
)

func Version() string {
return version
}

func Commit() string {
return commit
}

func Date() string {
return date
}

0 comments on commit 57be118

Please sign in to comment.