From b751d102f158968aab681cb663d27b4c32197f62 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Tue, 2 Jun 2026 21:48:02 +0300 Subject: feat: add preview update channel --- src/main.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index d7be42c6..13ba5e6f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,8 @@ const NESTED_HERDR_MESSAGES: [&str; 6] = [ mod agent_resume; mod api; mod app; +mod build_info; +mod checksum; mod cli; mod client; mod config; @@ -95,6 +97,11 @@ const DEFAULT_CONFIG: &str = r##"# herdr configuration # "current" for Herdr's process directory, or a fixed path such as "~/Projects". # new_cwd = "follow" +[update] +# Update channel used by background checks and `herdr update`. +# Use "stable" for normal releases or "preview" for opt-in preview builds. +# channel = "stable" + [keys] # Prefix key to enter prefix mode (default: "ctrl+b") # Examples: "ctrl+b", "f12", "esc", "-" @@ -404,9 +411,11 @@ fn main() -> io::Result<()> { println!(" herdr --remote [--session ]"); println!(" herdr session attach "); println!(" herdr update [--handoff]"); + println!(" herdr channel set "); println!(" herdr server stop"); println!(" herdr server reload-config"); println!(" herdr config ..."); + println!(" herdr channel ..."); println!(" herdr workspace ..."); println!(" herdr worktree ..."); println!(" herdr tab ..."); @@ -428,6 +437,10 @@ fn main() -> io::Result<()> { "herdr server stop", "Stop the running server via the API socket", ), + ( + "herdr channel set ", + "Choose the stable or preview update channel", + ), ( "herdr server reload-config", "Reload config.toml in the running server", @@ -436,6 +449,10 @@ fn main() -> io::Result<()> { "herdr config reset-keys", "Back up config.toml and remove custom keybindings", ), + ( + "herdr channel ", + "Manage the stable or preview update channel", + ), ( "herdr workspace ", "Workspace helpers over the socket API", @@ -491,7 +508,7 @@ fn main() -> io::Result<()> { } if args.iter().any(|a| a == "--version" || a == "-V") { - println!("herdr {}", env!("CARGO_PKG_VERSION")); + println!("herdr {}", crate::build_info::version()); return Ok(()); } @@ -527,6 +544,7 @@ fn main() -> io::Result<()> { "update", "status", "config", + "channel", "workspace", "worktree", "pane", -- cgit v1.2.3