diff --git a/CHANGELOG.md b/CHANGELOG.md index a686a2d..fc03747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com ## [Unreleased] +## [0.2.8] - 2024-03-04 + +- Auth reuse: use hard link instread of copying file +- Stop publish utils and cli to crates.io, because `Cargo` only allow modify `OutDir` during building now. +- Sync the version of cli and bin. + ## [0.2.7] - 2024-03-03 - improve error hint of IoErr diff --git a/Cargo.lock b/Cargo.lock index 2864c85..6c41c91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -347,7 +347,7 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fav" -version = "0.2.7" +version = "0.2.8" dependencies = [ "fav_cli", "tokio", @@ -357,7 +357,7 @@ dependencies = [ [[package]] name = "fav_cli" -version = "0.0.1" +version = "0.2.8" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index f7d2e0c..fb92dae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ resolver = "2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [workspace.package] -version = "0.2.7" +version = "0.2.8" authors = ["Louis <836250617@qq.com>"] description = "Back up your favorite online resources with CLI." license = "MIT" @@ -21,9 +21,9 @@ repository = "https://github.com/kingwingfly/fav" documentation = "" [workspace.dependencies] -fav_core = { path = "fav_core", version = ">=0.0.1" } +fav_core = { path = "fav_core" } fav_derive = { path = "fav_derive", version = ">=0.0.1" } -fav_utils = { path = "fav_utils", version = ">=0.0.1" } +fav_utils = { path = "fav_utils" } fav_cli = { path = "fav_cli" } fav_utils_old = { path = "fav_utils_old" } diff --git a/fav_cli/Cargo.toml b/fav_cli/Cargo.toml index 35f67fd..382ecaf 100644 --- a/fav_cli/Cargo.toml +++ b/fav_cli/Cargo.toml @@ -1,12 +1,13 @@ [package] name = "fav_cli" -version = "0.0.1" +version.workspace= true authors.workspace = true description = "Fav's CLI, helping persist the remote source. Repo: https://github.com/kingwingfly/fav" license.workspace = true edition.workspace = true repository.workspace = true documentation = "https://docs.rs/fav_cli" +publish = false [package.metadata.docs.rs] all-features = true diff --git a/fav_cli/src/bili/action.rs b/fav_cli/src/bili/action.rs index 56b689f..850b7db 100644 --- a/fav_cli/src/bili/action.rs +++ b/fav_cli/src/bili/action.rs @@ -8,13 +8,12 @@ use tracing::{info, warn}; pub(super) fn init() -> FavCoreResult<()> { #[cfg(not(test))] std::fs::create_dir_all(".fav")?; - Bili::default().write()?; BiliSets::default().write()?; Ok(()) } pub(super) async fn login() -> FavCoreResult<()> { - let mut bili = Bili::read()?; + let mut bili = Bili::default(); bili.login().await?; bili.write() } diff --git a/fav_cli/src/bili/mod.rs b/fav_cli/src/bili/mod.rs index 0937d86..b6099bd 100644 --- a/fav_cli/src/bili/mod.rs +++ b/fav_cli/src/bili/mod.rs @@ -97,7 +97,7 @@ impl Cli { AuthCommands::Login => login().await?, AuthCommands::Logout => logout().await?, AuthCommands::Reuse { path } => { - std::fs::copy(path.join("bili"), ".fav/bili")?; + std::fs::hard_link(path.join("bili"), ".fav/bili")?; } }, Commands::Status { diff --git a/fav_utils/Cargo.toml b/fav_utils/Cargo.toml index f8daeed..ef52d86 100644 --- a/fav_utils/Cargo.toml +++ b/fav_utils/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true edition.workspace = true repository.workspace = true documentation = "https://docs.rs/fav_utils" +publish = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html