Crates.io | update-notifier |
lib.rs | update-notifier |
version | 0.1.9 |
source | src |
created_at | 2020-05-12 19:05:09.653512 |
updated_at | 2020-07-10 19:19:15.106227 |
description | Library to notify you if there are any newer versions available on the registry |
homepage | https://github.com/tarikeshaq/update-notifier |
repository | https://github.com/tarikeshaq/update-notifier |
max_upload_size | |
id | 240798 |
size | 51,116 |
Update-notifier will notify your Rust CLI's users if there is an update available! You also have the freedom of setting the interval at which it will notify your users. This was built based on NPM's update-notifier
To use update-notifier
, add this to your Cargo.toml
:
[dependencies]
update-notifier = "0.1"
update-notifier::check_version takes the name and current version of your crate, along with an interval. It will print directly to stdout if the interval has been exceeded and an update is available
use update_notifier::check_version;
fn main() {
// Will notify users in one day intervals if an update is available
check_version(env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"), Duration::from_secs(60 * 60 * 24));
}
All contributions are welcome, feel free to file an issue or even a pull-request 🤝
Releases are done using cargo release
. Check cargo-release for more information
This project is licensed under the Mozilla Public License 2.0