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

crm --version could be smarter than hardcoded #943

Closed
zzhou1 opened this issue Feb 15, 2022 · 3 comments
Closed

crm --version could be smarter than hardcoded #943

zzhou1 opened this issue Feb 15, 2022 · 3 comments
Assignees

Comments

@zzhou1
Copy link
Contributor

zzhou1 commented Feb 15, 2022

tw1:~ # rpm -q crmsh
crmsh-4.4.0+20220208.5e6dca1d-1.1.noarch
tw1:~ # crm --version
crm 4.3.0

@liangxin1300
Copy link
Collaborator

fix in #946

@nicholasyang2022 nicholasyang2022 self-assigned this Dec 1, 2023
@nicholasyang2022
Copy link
Collaborator

nicholasyang2022 commented Dec 4, 2023

We have version string in 3 places:

  1. configure.ac: populated into ./version and used by crm --version
  2. in setup.py: shown in pip freeze
  3. in crmsh.spec: shown in rpm -q

For 1. and 2., it is easy to be unified as shown in ef418e1.

For 3., it is generated by obs source service. We are using tar_scm, which is able to get version information from git tags. However, this does not fit in our development procedures, as we need the version in rpm pumped for the 1st release candidate but the tag is created later when the code is stabilized.

A possible approach to make use of git tags and tar_scm is to create tag v4.6.0-rc1 for the 1st release candidate and let tar_scm extract 4.6.0 from it, so that it is no longer needed to hardcode the version in _service.

In conclusion, my proposal is:

  1. Create v4.x.x-rc1 tag, before submitting the 1st release candidate to obs. And let obs source service extract the version from the tag. This frees us from updating the version string in _service manually.
  2. Let setup.py read version string from ./version. This unifies the version string in crm --version and pip freeze.

With these 2 changes, there are still 2 sources of the version string. One is the git tags, another is the configure.ac.

@nicholasyang2022
Copy link
Collaborator

Implemented in #1280, 1132830, and #1287.

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

3 participants