Skip to content

Conversation

mosteo
Copy link
Member

@mosteo mosteo commented Jan 16, 2024

This may help down the line with reports of people using development versions, to uniquely identify them.

A script is invoked before build to patch in the commit (and an extra flag if the working folder is dirty).

After the build, "_or_later" is added to the build string, so we have a lower bound, but we are not mislead by manual builds that don't trigger the patching (via pure gprbuild).

So, the new versions would look like 2.0-dev+abcd1234 or 2.0-dev+abcd1234_or_later.

Since this triggers rebuilding a bunch of files if using alr build to build alr itself, it can be disabled by exporting ALR_VERSION_DONT_PATCH in the environment to avoid those rebuilds during development.

@mosteo mosteo force-pushed the feat/unique-version branch 2 times, most recently from ac70f1c to 0290026 Compare January 16, 2024 13:03
@mosteo mosteo marked this pull request as ready for review January 16, 2024 14:50
@mosteo mosteo force-pushed the feat/unique-version branch from 748ad18 to cbdbbf2 Compare January 24, 2024 20:38
@mosteo mosteo marked this pull request as draft January 25, 2024 16:35
@mosteo mosteo removed the request for review from Fabien-Chouteau January 25, 2024 16:35
@mosteo
Copy link
Member Author

mosteo commented Feb 8, 2024

I will rewrite the python part in Ada to avoid having a hidden dependency on Python, so I'm leaving this unmerged for now.

@mosteo mosteo added the type: enhancement Improvements to existing functionality label Feb 8, 2024
@mosteo mosteo added this to the 2.1 milestone Feb 8, 2024
@mosteo mosteo force-pushed the feat/unique-version branch from cbdbbf2 to bcf67bb Compare February 16, 2024 13:27
@mosteo mosteo force-pushed the feat/unique-version branch 10 times, most recently from cb95e2a to 3c07824 Compare June 13, 2024 09:18
@mosteo mosteo force-pushed the feat/unique-version branch from 3c07824 to c60bb9e Compare June 13, 2024 10:00
@mosteo mosteo marked this pull request as ready for review June 13, 2024 13:36
@mosteo mosteo merged commit bd25511 into master Jun 14, 2024
@mosteo mosteo deleted the feat/unique-version branch June 14, 2024 07:34
mosteo added a commit that referenced this pull request Jun 23, 2024
* Replace version build with current commit hash

* Detect dirtiness in . to flag it too in version

* Fix for line terminators on Windows

* Self-review

* Ada version

* Windows dispatcher script

* Patch from the dev/build.sh script too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants