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

Cutter version overrides and git query fix #3422

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

karliss
Copy link
Member

@karliss karliss commented Mar 10, 2025

Your checklist for this pull request

Detailed description

Alternative approach for #3421

  • Add option for disabling use of git hash in version in case it's incompatible with setup used for building distro specific packages.
  • Add option for additional version suffix. Can be used for package build number.
  • Explicitly specify repo directory when querying git information. Should reduce the chance of getting wrong build number in certain build setups. For example:
  • build_recipe_repo
    • .git
    • recipe
    • patches
    • build
    • cutter-src
      • .git

The fix isn't perfect, but it should be better than before. It will probably still fail if cutter-src has no .git folder.

Test plan (required)

(testing in progress)

  • Fresh checkout no additional args -> should have appropriate branch/hash ✔️

  • add additional commit and do a rebuild -> hash number should be updated ✔️ (need to run cmake, but value is correct even though config values from CMakeCache are reused).

  • Fresh build with CUTTER_VERSION_SUFFIX and CUTTER_INCLUDE_GIT_HASH ✔️

  • Fresh Build with nested repositories as described above, no additional args -> should use the hash of cutter repo not top folder ✔️

  • Fresh build without any git folders ✔️

Closing issues

* Explicitly specify repo directory when querying git information. Should reduce the chance of getting wrong build number in certain build setups. For example:

- build_recipe_repo
   - .git
   - recipe
   - patches
   - build
   - cutter-src
      - .git

* Add option for disabling use of git hash in version in case it's incompatible
with setup used for building distro specific packages.
* Add option for additional version suffix. Can be used for package build number.
@karliss karliss merged commit 7b85a2a into rizinorg:dev Mar 11, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants