feat(install): add version detection and upgrade support to install scripts
Add --version flag to codeg-server binary and enhance both install.sh and install.ps1 with version detection (skip if already up-to-date), running process stop before upgrade, and post-upgrade restart guidance. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,13 @@ use codeg_lib::web::{
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
// Support --version flag
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
if args.iter().any(|a| a == "--version" || a == "-V") {
|
||||
println!("{}", env!("CARGO_PKG_VERSION"));
|
||||
return;
|
||||
}
|
||||
|
||||
codeg_lib::process::ensure_user_npm_prefix_in_path();
|
||||
|
||||
let port: u16 = std::env::var("CODEG_PORT")
|
||||
|
||||
Reference in New Issue
Block a user