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

[crmsh-4.6] Unify version definition #1280

Merged

Conversation

nicholasyang2022
Copy link
Collaborator

@nicholasyang2022 nicholasyang2022 commented Dec 1, 2023

There are 2 version strings used in crmsh:

  1. The package metadata defined in setup.py. It was hardcoded in setup.py.
  2. The version file in source root ./version, which will be installed to /usr/shar/crmsh/version, used by crm --version. It was hardcoded in AC_INIT macro in configure.ac.

This pull request contains 2 changes:

  1. Make setup.py read version from ./version, so that the version string is unified between python package metadata and crm --version.
  2. Fix the --with-version option in autoconf, so that it can override the version string in generated ./version file. This allow a packager to override the version string.

With these change, a packager can use git describe and ./configure --with-version to generate version string automatically from git tags.

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (54751d3) 51.46% compared to head (f165e5b) 52.80%.

Additional details and impacted files
@@              Coverage Diff              @@
##           crmsh-4.6    #1280      +/-   ##
=============================================
+ Coverage      51.46%   52.80%   +1.33%     
=============================================
  Files             83       83              
  Lines          25020    25020              
=============================================
+ Hits           12877    13211     +334     
+ Misses         12143    11809     -334     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nicholasyang2022 nicholasyang2022 marked this pull request as ready for review December 14, 2023 06:20
@liangxin1300 liangxin1300 changed the title Unify version definition [crmsh-4.6] Unify version definition Dec 14, 2023
Copy link
Collaborator

@liangxin1300 liangxin1300 left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks!

@liangxin1300 liangxin1300 merged commit b2728f3 into ClusterLabs:crmsh-4.6 Dec 14, 2023
31 checks passed
@nicholasyang2022 nicholasyang2022 deleted the unify_version_definition branch December 15, 2023 08:00
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