Compare commits

...

2 commits

Author SHA1 Message Date
31ca5a4d03 feat: bump version to 0.0.9 2024-11-06 08:27:12 +01:00
7aa3aae4e6 fix: drop "v" from version string const
- remove "v" prefix from GoTomatoVersion constant
- re-add "v" for for human readable output (`-version`)
- update README
2024-11-05 23:31:24 +01:00
3 changed files with 8 additions and 8 deletions

View file

@ -67,11 +67,11 @@ The server periodically (every second) sends JSON-encoded messages to all connec
| Message Type | Example | | Message Type | Example |
| --- | --- | | --- | --- |
| Welcome Message | {"mode":"Idle", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":0, "time_left":1500, "ongoing":false, "paused":false, "version":"v0"} | | Welcome Message | {"mode":"Idle", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":0, "time_left":1500, "ongoing":false, "paused":false, "version":"0"} |
| Session Running | {"mode":"Work", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":1, "time_left":900, "ongoing":true, "paused":false, "version":"v0"} | | Session Running | {"mode":"Work", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":1, "time_left":900, "ongoing":true, "paused":false, "version":"0"} |
| Session Running | {"mode":"ShortBreak", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":2, "time_left":50, "ongoing":true, "paused":false, "version":"v0"} | | Session Running | {"mode":"ShortBreak", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":2, "time_left":50, "ongoing":true, "paused":false, "version":"0"} |
| Session Paused | {"mode":"Work", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":2, "time_left":456, "ongoing":true, "paused":true, "version":"v0"} | | Session Paused | {"mode":"Work", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":2, "time_left":456, "ongoing":true, "paused":true, "version":"0"} |
| Session End/Reset | {"mode":"End", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":0, "time_left":0, "ongoing":false, "paused":false, "version":"v0"} | | Session End/Reset | {"mode":"End", "settings":{"work":1500, "shortBreak":300, "longBreak":900, "sessions":4}, "session":0, "time_left":0, "ongoing":false, "paused":false, "version":"0"} |
## Testing ## Testing

View file

@ -28,8 +28,8 @@ func Start() {
// show server and protocl version and exit // show server and protocl version and exit
if *showVersionFlag { if *showVersionFlag {
fmt.Println("Server-Version:", metadata.GoTomatoVersion) fmt.Printf("Server-Version: v%s\n", metadata.GoTomatoVersion)
fmt.Println("Protocol-Version:", metadata.ProtocolVersion) fmt.Printf("Protocol-Version: v%s\n", metadata.ProtocolVersion)
os.Exit(0) os.Exit(0)
} }

View file

@ -2,5 +2,5 @@ package metadata
import "strings" import "strings"
const GoTomatoVersion = "v0.0.8" // The GoTomato version const GoTomatoVersion = "0.0.9" // The GoTomato version
var ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0] // The protocol version var ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0] // The protocol version