Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track cli version #67

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use trunk_analytics_cli::utils::{from_non_empty_or_default, parse_custom_tags};

#[derive(Debug, Parser)]
#[command(
version = std::env!("CARGO_PKG_VERSION"),
version = env!("CARGO_PKG_VERSION"),
name = "trunk-analytics-cli",
about = "Trunk Analytics CLI"
)]
Expand Down Expand Up @@ -206,12 +206,7 @@ async fn run_upload(
});
let meta = BundleMeta {
version: META_VERSION.to_string(),
cli_version: format!(
Copy link
Contributor

@zaycev zaycev Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just split this into 3 fields? Why do we have to do this in first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we had this in the first place, we don't use any of the other fields in the ETL it seems (we weren't even using cli_version). I think we log all 3 fields when running the CLI so might've just copied over that string

"cargo={} git={} rustc={}",
env!("CARGO_PKG_VERSION"),
env!("VERGEN_GIT_SHA"),
env!("VERGEN_RUSTC_SEMVER")
),
cli_version: env!("CARGO_PKG_VERSION").to_string(),
org: org_url_slug.clone(),
repo: repo.clone(),
tags,
Expand Down