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

cli: use cargo package version environment data in cli options struct #1229

Merged
merged 12 commits into from
Sep 30, 2021
Merged

cli: use cargo package version environment data in cli options struct #1229

merged 12 commits into from
Sep 30, 2021

Conversation

q9f
Copy link
Contributor

@q9f q9f commented Sep 27, 2021

Summary of changes
Changes introduced in this pull request:

  • version mismatch between CLI and Cargo.toml fixed
  • CLI uses CARGO_PKG_* environment variables to reduce the duplicated text
  • create a build.rs script that determines a meaningful version string at build time
  • defines a RELEASE_TRACK which can be used in future
  • use --features release for tag releases

Other information and links

~/.opt/chainsafe/forest q9f/cli/release*
❯ cargo build --bin forest
    Finished dev [unoptimized + debuginfo] target(s) in 0.23s

~/.opt/chainsafe/forest q9f/cli/release*
❯ target/debug/forest --version
forest v0.1.0/unstable/fb019318

~/.opt/chainsafe/forest q9f/cli/release*
❯ cargo build --release --bin forest --features release
    Finished release [optimized] target(s) in 0.25s

~/.opt/chainsafe/forest q9f/cli/release*
❯ target/release/forest --version
forest v0.1.0/alpha/fb019318

@q9f q9f requested a review from a user September 27, 2021 16:10
@q9f q9f mentioned this pull request Sep 28, 2021
20 tasks
Copy link
Member

@ec2 ec2 left a comment

Choose a reason for hiding this comment

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

lgtm

@q9f q9f merged commit db5bb06 into ChainSafe:main Sep 30, 2021
@q9f q9f deleted the q9f/cli/release branch September 30, 2021 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants