release: prepare GP Connect 3.5.0 with Windows support

This commit is contained in:
Kevin Yue committed 2026-11-19 01:40:22 +08:00
1 parent 6ffb1e8709
commit 43c20d0976
172 files changed
+9629 -1171

No files matched your search

+6 -6
View File
@@ -1,8 +1,8 @@
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
#[cfg(any(windows, target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
use auth::forward_auth_callback;
use auth::{BrowserAuthenticator, auth_prelogin};
use clap::Parser;
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
#[cfg(any(windows, target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
use clap::Subcommand;
#[cfg(feature = "webview-auth")]
use gpapi::auth::AuthWindowTheme;
@@ -49,7 +49,7 @@ See 'gpauth -h' for more information.
"
)]
struct Cli {
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
#[cfg(any(windows, target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
#[command(subcommand)]
command: Option<CliCommand>,
@@ -134,7 +134,7 @@ struct Cli {
verbose: InfoLevelVerbosity,
}
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
#[cfg(any(windows, target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
#[derive(Subcommand)]
enum CliCommand {
#[command(hide = true)]
@@ -272,7 +272,7 @@ fn init_logger(cli: &Cli) {
pub async fn run() {
let cli = Cli::parse();
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
#[cfg(any(windows, target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
if let Some(CliCommand::AuthCallback { callback }) = &cli.command {
if let Err(err) = forward_auth_callback(callback).await {
eprintln!("Failed to forward authentication callback: {err}");
@@ -382,7 +382,7 @@ mod tests {
}
#[test]
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
#[cfg(any(windows, target_os = "linux", target_os = "freebsd", target_os = "openbsd"))]
fn callback_arguments_parse_separately() {
let cli = Cli::try_parse_from([
"gpauth",