Accept diagnostics as an argument, even though it doesn't do anything
This commit is contained in:
parent
fa869ccfd8
commit
6ef35ded69
|
@ -68,6 +68,16 @@ struct Args {
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
upstream: Option<String>,
|
upstream: Option<String>,
|
||||||
|
|
||||||
|
/// Diagnostic endpoint to send diagnostics and performance data.
|
||||||
|
///
|
||||||
|
/// Set it to an empty string to disable reporting.
|
||||||
|
/// See the README for details.
|
||||||
|
#[arg(
|
||||||
|
long,
|
||||||
|
default_value = "https://install.determinate.systems/nix-actions-cache/perf"
|
||||||
|
)]
|
||||||
|
diagnostic_endpoint: String,
|
||||||
|
|
||||||
/// Daemonize the server.
|
/// Daemonize the server.
|
||||||
///
|
///
|
||||||
/// This is for use in the GitHub Action only.
|
/// This is for use in the GitHub Action only.
|
||||||
|
@ -115,6 +125,15 @@ fn main() {
|
||||||
.expect("Failed to load credentials from environment (see README.md)")
|
.expect("Failed to load credentials from environment (see README.md)")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
match args.diagnostic_endpoint.as_str() {
|
||||||
|
"" => {
|
||||||
|
tracing::info!("Diagnostics disabled.");
|
||||||
|
}
|
||||||
|
url => {
|
||||||
|
tracing::info!("Diagnostics would report to {url}, but is currently unimplemented.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let mut api = Api::new(credentials).expect("Failed to initialize GitHub Actions Cache API");
|
let mut api = Api::new(credentials).expect("Failed to initialize GitHub Actions Cache API");
|
||||||
|
|
||||||
if let Some(cache_version) = &args.cache_version {
|
if let Some(cache_version) = &args.cache_version {
|
||||||
|
|
Loading…
Reference in a new issue