mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-29 00:40:18 +08:00
refactor(service)!: remove the development service channel workflow (#8727)
* perf(traffic): shorten sidebar graph animation * refactor(service)!: remove the development service channel workflow Delete the verge-dev/dev-sidecar features, the dev.mjs script family, and the CLASH_VERGE_DEV_SERVICE_DIR staging chain. Debug builds keep the isolated .dev application data directory and dev sidecar IPC names through #[cfg(debug_assertions)] instead of the removed feature. Point clash_verge_service_ipc at tag v2.8.2. * chore(service): track the development-channel removal draft Point clash_verge_service_ipc at the removal branch while its PR is open; flip to tag v2.8.2 once the service side merges. * chore(service): track the released service 2.8.2 The removal branch merged as clash-verge-rev/clash-verge-service-ipc#105 (with the digest opt-in from clash-verge-rev/clash-verge-service-ipc#106 and the 2.8.2 release bump on top), so track the service repository's main directly instead of the draft branch.
This commit is contained in:
+10
-10
@@ -8,14 +8,14 @@ use std::{
|
||||
};
|
||||
use tauri::Manager as _;
|
||||
|
||||
#[cfg(not(feature = "verge-dev"))]
|
||||
#[cfg(not(debug_assertions))]
|
||||
pub static APP_ID: &str = "io.github.clash-verge-rev.clash-verge-rev";
|
||||
#[cfg(not(feature = "verge-dev"))]
|
||||
#[cfg(not(debug_assertions))]
|
||||
pub static BACKUP_DIR: &str = "clash-verge-rev-backup";
|
||||
|
||||
#[cfg(feature = "verge-dev")]
|
||||
#[cfg(debug_assertions)]
|
||||
pub static APP_ID: &str = "io.github.clash-verge-rev.clash-verge-rev.dev";
|
||||
#[cfg(feature = "verge-dev")]
|
||||
#[cfg(debug_assertions)]
|
||||
pub static BACKUP_DIR: &str = "clash-verge-rev-backup-dev";
|
||||
|
||||
pub static CLASH_CONFIG: &str = "config.yaml";
|
||||
@@ -219,9 +219,9 @@ fn sidecar_ipc_path_for(
|
||||
|
||||
let root = std::ffi::CStr::from_bytes_until_nul(&buffer)
|
||||
.map_err(|_| anyhow::anyhow!("macOS per-user temporary directory is not NUL-terminated"))?;
|
||||
#[cfg(feature = "verge-dev")]
|
||||
#[cfg(debug_assertions)]
|
||||
let filename = "verge-mihomo-dev.sock";
|
||||
#[cfg(not(feature = "verge-dev"))]
|
||||
#[cfg(not(debug_assertions))]
|
||||
let filename = "verge-mihomo.sock";
|
||||
let path = PathBuf::from(OsStr::from_bytes(root.to_bytes())).join(filename);
|
||||
|
||||
@@ -238,7 +238,7 @@ fn sidecar_ipc_path_for(
|
||||
|
||||
#[cfg(windows)]
|
||||
fn sidecar_ipc_path_for(_app_root: &std::path::Path, identity: &clash_verge_service_ipc::OwnerIdentity) -> PathBuf {
|
||||
PathBuf::from(sidecar_pipe_name(identity, cfg!(feature = "verge-dev")))
|
||||
PathBuf::from(sidecar_pipe_name(identity, cfg!(debug_assertions)))
|
||||
}
|
||||
|
||||
#[cfg(any(windows, test))]
|
||||
@@ -285,9 +285,9 @@ mod ipc_tests {
|
||||
|
||||
assert!(!path.starts_with(app_root));
|
||||
assert!(path.as_os_str().as_bytes().len() < 104);
|
||||
#[cfg(feature = "verge-dev")]
|
||||
#[cfg(debug_assertions)]
|
||||
assert_eq!(path.file_name(), Some(OsStr::new("verge-mihomo-dev.sock")));
|
||||
#[cfg(not(feature = "verge-dev"))]
|
||||
#[cfg(not(debug_assertions))]
|
||||
assert_eq!(path.file_name(), Some(OsStr::new("verge-mihomo.sock")));
|
||||
assert_eq!(path, sidecar_ipc_path_for(Path::new("/different/root"), &identity)?);
|
||||
assert!(path.parent().is_some_and(Path::is_dir));
|
||||
@@ -312,7 +312,7 @@ mod ipc_tests {
|
||||
path,
|
||||
Path::new(&format!(
|
||||
r"\\.\pipe\verge-mihomo-sidecar-{}-{}",
|
||||
if cfg!(feature = "verge-dev") { "dev" } else { "release" },
|
||||
if cfg!(debug_assertions) { "dev" } else { "release" },
|
||||
clash_verge_service_ipc::owner_key(&identity)
|
||||
))
|
||||
);
|
||||
|
||||
@@ -166,9 +166,6 @@ fn start_embedded_server(listener: tokio::net::TcpListener, token: String) {
|
||||
let (shutdown_tx, shutdown_rx) = oneshot::channel();
|
||||
let _ = SHUTDOWN_SENDER.set(Mutex::new(Some(shutdown_tx)));
|
||||
|
||||
#[cfg(feature = "verge-dev")]
|
||||
let auth = instance_auth(token);
|
||||
#[cfg(not(feature = "verge-dev"))]
|
||||
let auth = instance_auth(token);
|
||||
|
||||
let visible = warp::path!("commands" / "visible").and_then(|| async {
|
||||
|
||||
Reference in New Issue
Block a user