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

Add a subcommand to create-archive.py to output the version of a package #474

Closed
mulkieran opened this issue Sep 19, 2023 · 1 comment
Closed
Assignees

Comments

@mulkieran
Copy link
Member

mulkieran commented Sep 19, 2023

This is only for Packit.

Packit has an action, get-current-version, which requires a command to get the current version. This is easy enough with stratis-cli because we can use setup.cfg and python setup --version. It's a bit harder w/ stratisd, though, so we get the version from the spec file via rpmspec. This is no problem for us, because the command works and Packit doesn't make use of it the result in anything that matters to us. We have two ways of extracting the stratisd version from Rust source; one is to read the Cargo.toml file as a TOML file and get the key, the other is to use cargo-metadata and extract the version from the resulting JSON. Both of these ways are a bit much to put in a single shell command, and so we do not use them in our Packit configuration. If we added a subcommand, it would use the facilities already in create_archive to get the version for stratisd and also for stratis-cli and we would use that create_archive.py command in the packit configuration.

@mulkieran
Copy link
Member Author

mulkieran commented Nov 8, 2023

We satisfied this need by using cargo version-util: stratis-storage/stratisd#3484 .

@mulkieran mulkieran self-assigned this Nov 8, 2023
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

No branches or pull requests

1 participant