Skip to content

Commit

Permalink
feat: Add support for versioned builds
Browse files Browse the repository at this point in the history
Support versioned builds by -ldflags.

Also, remove old UI test client main.
  • Loading branch information
milonoir committed Oct 10, 2023
1 parent b5c72d5 commit 178439a
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 309 deletions.
301 changes: 0 additions & 301 deletions cmd/bc-client/old_main.go

This file was deleted.

7 changes: 0 additions & 7 deletions cmd/bc-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ func main() {
log.Fatalf("corrupted assets file: %s\n", err)
}

// Initializing the game.
//g := server.NewGame(a)
//
//fmt.Println(g.Companies)
//fmt.Println(g.PlayerDeck)
//fmt.Println(g.BankDeck)

// Setup OS signal trap.
sig := make(chan os.Signal, 1)
signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
Expand Down
2 changes: 1 addition & 1 deletion internal/client/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (a *Application) initUI() {

// Game version widget.
a.version = ui.NewVersionPanel()
a.version.SetVersion("0.0.1")
a.version.SetVersion(game.Version)
gamePage.AddItem(a.version.GetTextView(), 4, 0, 1, 1, 1, 1, false)

// Server status widget.
Expand Down
6 changes: 6 additions & 0 deletions internal/game/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package game

var (
// Version is the current version of the game.
Version = "0.0.0-dev"
)
1 change: 1 addition & 0 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func (s *Server) handler() http.HandlerFunc {
}

func (s *Server) Start(a *game.Assets) {
s.l.Info(fmt.Sprintf("The Business Club - server v%s", game.Version))
// Start the lobby.
s.l.Info("starting lobby")
s.lobby = newLobby(s.l, a)
Expand Down
Loading

0 comments on commit 178439a

Please sign in to comment.