Teach scripts about git version #393
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
More clever version information in
install.sh --version
, extracted by CMake and incaf --version
andcafrun --version
Rationale for changes
The "odd patch level version number between releases" was getting a bit annoying, and I wanted an easier way to tell which commit a users code is based on. Now it should be possible, under most circumstances to easily get this information.
One exception is when someone does a shallow clone... since git describe won't be able to track back to a tag, but this is fine, since it should still have the commit hash... so where we need something that looks like x.y.z (e.g., CMake project version) we fall back on the embedded version in .VERSION
If the user is using an official release tarball then
.gitattributes
to embed additional information in.VERSION
file including:So just make sure to
git checkout <tag>
beforegit archive --prefix=OpenCoarrays-$(git describe)/ -o OpenCoarrays-$(git describe).tar.gz <tag>
to have the cleanest info in .VERSION. (It will still work if you don't checkout the tag first, you'll just add info about where your current HEAD is at...)Additional info and certifications
This pull request (PR) is a:
I certify that:
WIP:
to thebeginning of the PR title
DO NOT MERGE:
to the beginning of the titleissue-<#>
where<#>
is replaced by the issue that this PRis addressing
touches
touches
changes
ctest
) and all tests passset of changes
imperative verb, and is no longer than 50 characters
summarizing your commit
include additional paragraphs, bulleted lists, etc.
commit resolves an open issue.
clicking the "details" link to the right of the
licence/cla
check and following the directions on the CLA assistant webpage
For contributors and SI team members with code review priviledges
pullapprove comment or Github code review so that someone
else has the chance to review my proposed changes