Closed zzhou1 closed 10 months ago
fix in #946
We have version string in 3 places:
configure.ac
: populated into ./version
and used by crm --version
setup.py
: shown in pip freeze
crmsh.spec
: shown in rpm -q
For 1. and 2., it is easy to be unified as shown in ef418e1c4016b5ffcaf0968b1164c569a5d137e7.
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:
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.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
.
Implemented in #1280, 1132830, and #1287.
tw1:~ # rpm -q crmsh crmsh-4.4.0+20220208.5e6dca1d-1.1.noarch tw1:~ # crm --version crm 4.3.0