fix: remove doubled -alpha-alpha version suffix

CARGO_PKG_VERSION already contains -alpha from Cargo.toml, so the
format!("{}-alpha", ...) was producing 1.2.0-alpha-alpha. Use the
Cargo version directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-18 11:28:28 +00:00
parent b9c9881e4b
commit 3187d1ad28
2 changed files with 3 additions and 3 deletions

View File

@@ -244,7 +244,7 @@ impl DataModel {
Self {
server_info: ServerInfo {
id: uuid::Uuid::new_v4().to_string(),
version: format!("{}-alpha", env!("CARGO_PKG_VERSION")),
version: env!("CARGO_PKG_VERSION").to_string(),
name: Some("Archipelago".to_string()),
pubkey: String::new(),
status_info: StatusInfo {

View File

@@ -94,8 +94,8 @@ mod tests {
let sm = StateManager::new();
let (data, rev) = sm.get_snapshot().await;
assert_eq!(rev, 0);
// DataModel::new() sets version from CARGO_PKG_VERSION with alpha suffix
assert_eq!(data.server_info.version, format!("{}-alpha", env!("CARGO_PKG_VERSION")));
// DataModel::new() sets version from CARGO_PKG_VERSION
assert_eq!(data.server_info.version, env!("CARGO_PKG_VERSION"));
assert!(data.package_data.is_empty());
assert!(data.notifications.is_empty());
}