feat: sequential build versioning, LND NET_RAW, status labels
Build versioning: - Sequential build counter (/opt/archipelago/build-counter) - Version format: 0.1.0-beta.N (written to build-info.txt) - Backend reads version from build-info.txt at startup, falls back to Cargo.toml version — no recompile needed - UI sidebar + settings show the build version automatically LND fix (belt + suspenders): - Added NET_RAW capability (config.rs, first-boot, container-specs) - Combined with tlsextraip=0.0.0.0 from previous commit Status labels: - Both "exited" AND "stopped" states with non-zero exit codes now show "crashed" in the UI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -253,12 +253,29 @@ pub struct PatchOperation {
|
||||
}
|
||||
|
||||
impl DataModel {
|
||||
/// Read build version from /opt/archipelago/build-info.txt if available,
|
||||
/// falling back to Cargo.toml version. This allows sequential CI build
|
||||
/// numbers to be reflected in the UI without recompiling the binary.
|
||||
fn detect_build_version() -> String {
|
||||
if let Ok(content) = std::fs::read_to_string("/opt/archipelago/build-info.txt") {
|
||||
for line in content.lines() {
|
||||
if let Some(v) = line.strip_prefix("version=") {
|
||||
let v = v.trim();
|
||||
if !v.is_empty() {
|
||||
return v.to_string();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
env!("CARGO_PKG_VERSION").to_string()
|
||||
}
|
||||
|
||||
/// Create a new empty data model with default values
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
server_info: ServerInfo {
|
||||
id: uuid::Uuid::new_v4().to_string(),
|
||||
version: env!("CARGO_PKG_VERSION").to_string(),
|
||||
version: Self::detect_build_version(),
|
||||
name: Some("Archipelago".to_string()),
|
||||
pubkey: String::new(),
|
||||
status_info: StatusInfo {
|
||||
|
||||
Reference in New Issue
Block a user