Only write dev port file when in dev not prod (vibe-kanban) (#468)

* Cleanup script changes for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a

* Commit changes from coding agent for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a

* Cleanup script changes for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a

* Commit changes from coding agent for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a

* Cleanup script changes for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a

* Commit changes from coding agent for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a
This commit is contained in:
Louis Knight-Webb
2025-08-14 09:58:33 +01:00
committed by GitHub
parent 89f8e63e02
commit 7939de51df
2 changed files with 5 additions and 4 deletions

View File

@@ -834,8 +834,7 @@ mod tests {
.count();
assert!(
patch_count >= 2,
"Expected at least 2 patches, got {}",
patch_count
"Expected at least 2 patches, got {patch_count}"
);
}

View File

@@ -67,8 +67,10 @@ async fn main() -> Result<(), VibeKanbanError> {
let listener = tokio::net::TcpListener::bind(format!("{host}:{port}")).await?;
let actual_port = listener.local_addr()?.port(); // get → 53427 (example)
// Write port file for discovery
write_port_file(actual_port).await?;
// Write port file for discovery (dev builds always, release builds only if enabled)
if cfg!(debug_assertions) || std::env::var_os("ENABLE_PORT_FILE").is_some() {
write_port_file(actual_port).await?;
}
tracing::info!("Server running on http://{host}:{actual_port}");