diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b1c8b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/dist diff --git a/Makefile b/Makefile index 7e2bcb7..4723a02 100644 --- a/Makefile +++ b/Makefile @@ -16,4 +16,7 @@ server: example: (cd example && go build) +release: + GITHUB_TOKEN=$$GITHUB_REPO_TOKEN goreleaser + .PHONY: build test vet server example diff --git a/goreleaser.yml b/goreleaser.yml new file mode 100644 index 0000000..7be4061 --- /dev/null +++ b/goreleaser.yml @@ -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 diff --git a/ui/tui.go b/ui/tui.go index cf71a45..1c29937 100644 --- a/ui/tui.go +++ b/ui/tui.go @@ -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{} diff --git a/version/version.go b/version/version.go index ee59a7c..3dc7549 100644 --- a/version/version.go +++ b/version/version.go @@ -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 +}