Skip to content

Commit

Permalink
last fix and add to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
macovedj committed Mar 6, 2024
1 parent dfc28f8 commit 9ac4270
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
9 changes: 7 additions & 2 deletions ci/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! * `./publish verify` - verify crates can be published to crates.io
//! * `./publish publish` - actually publish crates to crates.io
use indexmap::{IndexMap};
use indexmap::IndexMap;
use std::env;
use std::fs;
use std::path::{Path, PathBuf};
Expand All @@ -20,6 +20,7 @@ const CRATES_TO_PUBLISH: &[&str] = &[
"warg-protocol",
"warg-api",
"warg-client",
"warg-credentials",
"warg-server",
"warg-cli",
];
Expand All @@ -35,6 +36,7 @@ const PUBLIC_CRATES: &[&str] = &[
"warg-protocol",
"warg-api",
"warg-client",
"warg-credentials",
"warg-server",
"warg-cli",
];
Expand Down Expand Up @@ -161,7 +163,10 @@ fn read_crate(ws: Option<&Workspace>, manifest: &Path) -> Crate {
);
}
if let Some(ws) = ws {
if version.is_none() && (line.starts_with("version.workspace = true") || line.starts_with("version = { workspace = true }")) {
if version.is_none()
&& (line.starts_with("version.workspace = true")
|| line.starts_with("version = { workspace = true }"))
{
version = Some(ws.version.clone());
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/client/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ impl Client {
pub fn url(&self) -> &RegistryUrl {
&self.url
}

/// Gets the latest checkpoint from the registry.
pub async fn latest_checkpoint(
&self,
Expand Down
2 changes: 1 addition & 1 deletion crates/client/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl Config {
pathdiff::diff_paths(&p, &parent).unwrap()
}),
keys: self.keys.clone(),
keyring_auth: false,
keyring_auth: self.keyring_auth,
};

serde_json::to_writer_pretty(
Expand Down
5 changes: 3 additions & 2 deletions src/commands/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,21 @@ impl LoginCommand {
.context("failed to read token")?;
self.keyring_entry
.set_entry(self.common.read_config()?.home_url, &token)?;
config.keyring_auth = true;
config.write_to_file(&Config::default_config_path()?)?;
println!("auth token was set successfully, and generated default key",);
println!("Public Key: {public_key}");
return Ok(());
}
config.keyring_auth = true;
config.write_to_file(&Config::default_config_path()?)?;

let token = Password::with_theme(&ColorfulTheme::default())
.with_prompt("Enter auth token")
.interact()
.context("failed to read token")?;
self.keyring_entry
.set_entry(self.common.read_config()?.home_url, &token)?;
config.keyring_auth = true;
config.write_to_file(&Config::default_config_path()?)?;
println!("auth token was set successfully",);
Ok(())
}
Expand Down

0 comments on commit 9ac4270

Please sign in to comment.