diff --git a/Cargo.lock b/Cargo.lock
index 434407c..de6765c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -189,7 +189,7 @@ dependencies = [
[[package]]
name = "backbone-lib"
-version = "0.1.0"
+version = "0.2.11"
dependencies = [
"bytes",
"ewebsock",
@@ -2649,7 +2649,7 @@ dependencies = [
[[package]]
name = "protocol"
-version = "0.1.0"
+version = "0.2.11"
dependencies = [
"serde",
]
@@ -2883,7 +2883,7 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
[[package]]
name = "relay-server"
-version = "0.1.0"
+version = "0.2.11"
dependencies = [
"argon2",
"axum",
@@ -3893,7 +3893,7 @@ dependencies = [
[[package]]
name = "trictrac-store"
-version = "0.1.0"
+version = "0.2.11"
dependencies = [
"anyhow",
"base64 0.21.7",
@@ -3906,7 +3906,7 @@ dependencies = [
[[package]]
name = "trictrac-web"
-version = "0.1.0"
+version = "0.2.11"
dependencies = [
"backbone-lib",
"futures",
diff --git a/Cargo.toml b/Cargo.toml
index e78d862..9db1a73 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,3 +1,6 @@
+[workspace.package]
+version = "0.2.11"
+
[workspace]
resolver = "2"
diff --git a/clients/backbone-lib/Cargo.toml b/clients/backbone-lib/Cargo.toml
index 1e57d93..d6ae5c9 100644
--- a/clients/backbone-lib/Cargo.toml
+++ b/clients/backbone-lib/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "backbone-lib"
-version = "0.1.0"
+version.workspace = true
edition = "2024"
[dependencies]
diff --git a/clients/web/Cargo.toml b/clients/web/Cargo.toml
index 4849bec..1edb9eb 100644
--- a/clients/web/Cargo.toml
+++ b/clients/web/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "trictrac-web"
-version = "0.1.0"
+version.workspace = true
edition = "2021"
[package.metadata.leptos-i18n]
diff --git a/clients/web/assets/style.css b/clients/web/assets/style.css
index e81e0de..09b21e9 100644
--- a/clients/web/assets/style.css
+++ b/clients/web/assets/style.css
@@ -2076,3 +2076,19 @@ a:hover { text-decoration: underline; }
max-width: 200px;
margin: 0 auto;
}
+
+/* Push the version wrapper to the bottom of the sidebar flex column */
+.game-sidebar > div:has(.site-nav-version) {
+ margin-top: auto;
+ padding: 0.75rem 1rem;
+ border-top: 1px solid rgba(200,164,72,0.12);
+}
+
+.site-nav-version {
+ display: block;
+ text-align: center;
+ font-family: var(--font-ui);
+ font-size: 0.7rem;
+ letter-spacing: 0.06em;
+ color: rgba(200,164,72,0.4);
+}
diff --git a/clients/web/src/app.rs b/clients/web/src/app.rs
index 3819b61..5c38d33 100644
--- a/clients/web/src/app.rs
+++ b/clients/web/src/app.rs
@@ -32,6 +32,7 @@ use std::collections::VecDeque;
const RELAY_URL: &str = "ws://localhost:8080/ws";
const GAME_ID: &str = "trictrac";
const STORAGE_KEY: &str = "trictrac_session";
+const VERSION: &str = env!("CARGO_PKG_VERSION");
/// The state the UI needs to render the game screen.
#[derive(Clone, PartialEq)]
@@ -621,6 +622,9 @@ fn SiteHamburger() -> impl IntoView {
sidebar_open.set(false);
}>{t!(i18n, replay_snapshot)}
+
+ "v" {VERSION}
+
// ── Replay snapshot modal ─────────────────────────────────────────────
diff --git a/clients/web/src/nav.rs b/clients/web/src/nav.rs
deleted file mode 100644
index 10ecc36..0000000
--- a/clients/web/src/nav.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-use leptos::prelude::*;
-use leptos::task::spawn_local;
-use leptos_router::components::A;
-
-use crate::api;
-use crate::i18n::*;
-
-#[component]
-pub fn SiteNav() -> impl IntoView {
- let i18n = use_i18n();
- let auth_username =
- use_context::>>().expect("auth_username context not found");
-
- let logout = move |_| {
- spawn_local(async move {
- let _ = api::post_logout().await;
- auth_username.set(None);
- });
- };
-
- view! {
-
- }
-}
diff --git a/flake.nix b/flake.nix
index 54da2ed..cde292d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -103,7 +103,7 @@
trictrac = with final; rustPlatform.buildRustPackage {
pname = "trictrac";
- version = "0.2.1";
+ version = "0.2.11"; # trictrac-version
src = ./.;
nativeBuildInputs = [ pkg-config ];
diff --git a/justfile b/justfile
index fe80391..fe4e52e 100644
--- a/justfile
+++ b/justfile
@@ -2,6 +2,17 @@
# ^ A shebang isn't required, but allows a justfile to be executed
# like a script, with `./justfile test`, for example.
+# Bump the project version and start a git-flow release.
+# Usage: just bump 0.2.12
+# After running, finish with: git flow release finish
+bump version:
+ sed -i '/^\[workspace\.package\]/,/^\[/{s/^version = ".*"/version = "{{version}}"/}' Cargo.toml
+ sed -i 's/version = "[0-9.]*"; # trictrac-version/version = "{{version}}"; # trictrac-version/' flake.nix
+ git flow release start {{version}}
+ git add Cargo.toml flake.nix
+ git commit -m "chore: bump version to {{version}}"
+ @echo "Done. Finish with: git flow release finish {{version}}"
+
doc:
cargo doc --no-deps
shell:
diff --git a/server/protocol/Cargo.toml b/server/protocol/Cargo.toml
index 2630fc1..70f4e68 100644
--- a/server/protocol/Cargo.toml
+++ b/server/protocol/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "protocol"
-version = "0.1.0"
+version.workspace = true
edition = "2024"
[dependencies]
diff --git a/server/relay-server/Cargo.toml b/server/relay-server/Cargo.toml
index ccb97fa..1c0112b 100644
--- a/server/relay-server/Cargo.toml
+++ b/server/relay-server/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "relay-server"
-version = "0.1.0"
+version.workspace = true
edition = "2024"
[dependencies]
diff --git a/store/Cargo.toml b/store/Cargo.toml
index d8a594c..92b1b84 100644
--- a/store/Cargo.toml
+++ b/store/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "trictrac-store"
-version = "0.1.0"
+version.workspace = true
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html