Compare commits
4 commits
52a193353f
...
9335214f08
Author | SHA1 | Date | |
---|---|---|---|
9335214f08 | |||
31f588462f | |||
b15324f6f8 | |||
cbe2e007de |
5 changed files with 55 additions and 8 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,4 @@
|
||||||
GoTomato
|
GoTomato
|
||||||
|
|
||||||
|
dist/
|
||||||
|
.forgejo_token
|
||||||
|
|
44
.goreleaser.yaml
Normal file
44
.goreleaser.yaml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- rm -fr ./dist
|
||||||
|
- go mod tidy
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
|
||||||
|
upx:
|
||||||
|
- enabled: true
|
||||||
|
compress: best
|
||||||
|
lzma: true
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
sort: asc
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- "bump version to"
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- format: binary
|
||||||
|
|
||||||
|
release:
|
||||||
|
gitea:
|
||||||
|
owner: pomodoro
|
||||||
|
name: GoTomato
|
||||||
|
mode: replace
|
||||||
|
|
||||||
|
gitea_urls:
|
||||||
|
download: http://git.smsvc.net
|
||||||
|
api: http://git.smsvc.net/api/v1
|
||||||
|
|
||||||
|
env_files:
|
||||||
|
gitea_token: .forgejo_token
|
10
README.md
10
README.md
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,5 +2,5 @@ package metadata
|
||||||
|
|
||||||
import "strings"
|
import "strings"
|
||||||
|
|
||||||
const GoTomatoVersion = "v0.0.8" // The GoTomato version
|
const GoTomatoVersion = "0.1.1" // The GoTomato version
|
||||||
var ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0] // The protocol version
|
var ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0] // The protocol version
|
||||||
|
|
Loading…
Reference in a new issue