Compare commits

...

5 commits

Author SHA1 Message Date
c4e6be4e42
release script fix
All checks were successful
cargo devel CI / cargo CI (push) Successful in 2m19s
2024-01-23 14:03:57 +01:00
5f521fc00e
Merge branch 'devel' of https://git.cscherr.de/PlexSheep/pt into devel
Some checks failed
cargo devel CI / cargo CI (push) Has been cancelled
2024-01-23 14:03:01 +01:00
a626067375
update license year 2024-01-23 14:02:59 +01:00
c968e44349
add uptime to init
Some checks failed
cargo devel CI / cargo CI (push) Has been cancelled
2024-01-23 14:02:46 +01:00
5443acef3e
publish script now releases too
All checks were successful
cargo devel CI / cargo CI (push) Successful in 2m39s
2024-01-18 22:09:36 +01:00
6 changed files with 8 additions and 7 deletions

View file

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2023 Christoph Johannes Scherr Copyright (c) 2024 Christoph Johannes Scherr
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -75,7 +75,7 @@ impl Logger {
/// Will enable the logger to be used. /// Will enable the logger to be used.
/// ///
/// Assumes some defaults, use [`init_customized`](Self::init_customized) for more control /// Assumes some defaults, use [`init_customized`](Self::init_customized) for more control
pub fn init(log_dir: Option<PathBuf>, max_level: Option<Level>) -> Result<()> { pub fn init(log_dir: Option<PathBuf>, max_level: Option<Level>, uptime: bool) -> Result<()> {
Self::init_customized( Self::init_customized(
log_dir.is_some(), log_dir.is_some(),
log_dir.unwrap_or(PathBuf::from(DEFAULT_LOG_DIR)), log_dir.unwrap_or(PathBuf::from(DEFAULT_LOG_DIR)),
@ -89,7 +89,7 @@ impl Logger {
false, false,
false, false,
true, true,
false, uptime,
) )
} }

View file

@ -9,7 +9,8 @@ git add -A
git commit -m "Release v$NEW_VERSION" || (echo ">>>>>>>> COMMIT FAILED OR THERE WAS NOTHING TO COMMIT"; sleep 5) git commit -m "Release v$NEW_VERSION" || (echo ">>>>>>>> COMMIT FAILED OR THERE WAS NOTHING TO COMMIT"; sleep 5)
echo ">>>>>>>> SKIP!!!!!" echo ">>>>>>>> SKIP!!!!!"
cargo ws version --amend cargo ws version --amend
git push || (echo ">>>>>>>> PUSH FAILED OR THERE WAS NOTHING TO PUSH"; sleep 5) echo ">>>>>>>> PUBLISHING RELEASE FOR REPO"
bash scripts/release.sh
echo ">>>>>>>> PUBLISHING TO CRATES.IO NEXT" echo ">>>>>>>> PUBLISHING TO CRATES.IO NEXT"
sleep 10 sleep 10
cargo publish -p libpt-log cargo publish -p libpt-log

View file

@ -4,7 +4,7 @@ NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1')
VERSION=$(git rev-parse HEAD) VERSION=$(git rev-parse HEAD)
GIT_COMMIT_SHA=$(git rev-parse HEAD) GIT_COMMIT_SHA=$(git rev-parse HEAD)
BODY=" BODY="
$(git log $(git describe --tags --abbrev=0)..HEAD --pretty="- %s" -oneline --decorate) $(git log $(git describe --tags --abbrev=0)..HEAD --pretty="- %s" --oneline --decorate)
" "
USER=PlexSheep USER=PlexSheep
git tag "v$NEW_VERSION-test" || echo "could not tag" git tag "v$NEW_VERSION-test" || echo "could not tag"

View file

@ -91,7 +91,7 @@ fn main() {
} }
}; };
if cli.log_meta { if cli.log_meta {
Logger::init(None, Some(ll)).expect("could not initialize Logger"); Logger::init(None, Some(ll), false).expect("could not initialize Logger");
} else { } else {
// less verbose version // less verbose version
Logger::init_mini(Some(ll)).expect("could not initialize Logger"); Logger::init_mini(Some(ll)).expect("could not initialize Logger");

View file

@ -165,7 +165,7 @@ fn cli_parse() -> Cli {
} }
}; };
if cli.meta { if cli.meta {
Logger::init(None, Some(ll)).expect("could not initialize Logger"); Logger::init(None, Some(ll), false).expect("could not initialize Logger");
} else { } else {
// less verbose version // less verbose version
Logger::init_mini(Some(ll)).expect("could not initialize Logger"); Logger::init_mini(Some(ll)).expect("could not initialize Logger");