Skip to content

Commit

Permalink
feat: show version in title
Browse files Browse the repository at this point in the history
  • Loading branch information
agukrapo committed Jul 27, 2024
1 parent dc541f8 commit 37e05a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ build: clean
@GOOS=darwin GOARCH=amd64 go build -o ./bin/${NAME}_cli_darwin-amd64 ./cmd/cli
@GOOS=windows GOARCH=amd64 go build -o ./bin/${NAME}_cli_windows-amd64.exe ./cmd/cli
@GOOS=linux GOARCH=amd64 go build -o ./bin/${NAME}_cli_linux-amd64 ./cmd/cli
@fyne-cross windows --pull -arch=amd64 -app-id=com.github.agukrapo.playlist-creator ./cmd/gui
@fyne-cross windows --pull -arch=amd64 -app-id=com.github.agukrapo.playlist-creator -metadata version=$(shell git describe --abbrev=0 --tags) ./cmd/gui
@mv ./fyne-cross/bin/windows-amd64/playlist-creator.exe ./bin/${NAME}_gui_windows-amd64.exe

test:
Expand Down
8 changes: 7 additions & 1 deletion cmd/gui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ type application struct {

func newApplication(cookie string) *application {
out := fyneapp.New()
w := out.NewWindow(appTitle)

version := out.Metadata().Custom["version"]
if version == "" {
version = "dev"
}

w := out.NewWindow(fmt.Sprintf("%s %s", appTitle, version))
w.Resize(fyne.NewSize(1300, 800))

return &application{
Expand Down

0 comments on commit 37e05a8

Please sign in to comment.