Fix includes for publishing

This commit is contained in:
Edward Shen 2021-07-15 02:45:05 -04:00
parent 3786827f20
commit d3434e8408
Signed by: edward
GPG key ID: 19182661E818369F
3 changed files with 38 additions and 27 deletions

View file

@ -4,7 +4,14 @@ version = "0.5.0"
license = "GPL-3.0-or-later"
authors = ["Edward Shen <code@eddie.sh>"]
edition = "2018"
include = ["src/**/*", "db_queries", "LICENSE", "README.md", "sqlx-data.json"]
include = [
"src/**/*",
"db_queries",
"LICENSE",
"README.md",
"sqlx-data.json",
"settings.sample.yaml"
]
description = "A MangaDex@Home implementation in Rust."
repository = "https://github.com/edward-shen/mangadex-home-rs"

View file

@ -260,14 +260,16 @@ impl Display for InvalidCombination {
impl Error for InvalidCombination {}
fn print_preamble_and_warnings(args: &Config) -> Result<(), Box<dyn Error>> {
println!(concat!(
let build_string = option_env!("VERGEN_GIT_SHA_SHORT")
.map(|git_sha| format!(" ({})", git_sha))
.unwrap_or_default();
println!(
concat!(
env!("CARGO_PKG_NAME"),
" ",
env!("CARGO_PKG_VERSION"),
" (",
env!("VERGEN_GIT_SHA_SHORT"),
")",
" Copyright (C) 2021 ",
"{} Copyright (C) 2021 ",
env!("CARGO_PKG_AUTHORS"),
"\n\n",
env!("CARGO_PKG_NAME"),
@ -284,7 +286,9 @@ fn print_preamble_and_warnings(args: &Config) -> Result<(), Box<dyn Error>> {
along with ",
env!("CARGO_PKG_NAME"),
". If not, see <https://www.gnu.org/licenses/>.\n"
));
),
build_string
);
if args.ephemeral_disk_encryption {
error!("Encrypted files are _very_ broken; caveat emptor!");

View file

@ -111,7 +111,7 @@ pub async fn load_geo_ip_data(license_key: ClientSecret) -> Result<(), DbLoadErr
}
})
.unwrap_or(SystemTime::UNIX_EPOCH);
let duration = match SystemTime::now().duration_since(dbg!(db_date_created)) {
let duration = match SystemTime::now().duration_since(db_date_created) {
Ok(time) => Duration::from_std(time).expect("duration to fit"),
Err(_) => {
warn!("Clock may have gone backwards?");