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

Auto Revision #838

Merged
merged 14 commits into from
Jan 21, 2022
Merged

Auto Revision #838

merged 14 commits into from
Jan 21, 2022

Conversation

jwrober
Copy link
Collaborator

@jwrober jwrober commented Jan 20, 2022

This commit establishes the basics of getting some status from git and using that information when configuring and compiling freeciv21. Does not support the tagged tarball at this point. Right now this assumes you have a working repository and git installed.

Eventually closes #444

@jwrober jwrober changed the title First attempt at AutoRevision Auto Revision Jan 20, 2022
@jwrober
Copy link
Collaborator Author

jwrober commented Jan 20, 2022

At this point I think this PR is close to ready. Need to figure out how to handle if git is not installed and there is no repository to query (effectively a person is compiling from a tarball). If there was a way for the tarball generator to create a file with two values in it, then I could have CMake look that data up as a fall back.

@lmoureaux
Copy link
Contributor

At this point I think this PR is close to ready. Need to figure out how to handle if git is not installed and there is no repository to query (effectively a person is compiling from a tarball). If there was a way for the tarball generator to create a file with two values in it, then I could have CMake look that data up as a fall back.

Have a look at https://git-scm.com/docs/gitattributes#_export_subst

@jwrober jwrober marked this pull request as ready for review January 20, 2022 23:32
@jwrober jwrober requested a review from lmoureaux January 20, 2022 23:51
Copy link
Contributor

@lmoureaux lmoureaux left a comment

Choose a reason for hiding this comment

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

In order to test this, could you make a new branch in your fork and create a release there?

cmake/AutoRevision.cmake Outdated Show resolved Hide resolved
@jwrober jwrober force-pushed the feature/auto-revision branch 6 times, most recently from 29600e5 to fc51adb Compare January 21, 2022 20:27
@jwrober
Copy link
Collaborator Author

jwrober commented Jan 21, 2022

One the tests complete, I think this PR is ready to merge. Only "issue" per se is the duplicate of the source tarball and zip at release time. We can point users to the defined assets in the release notes.

Copy link
Contributor

@lmoureaux lmoureaux left a comment

Choose a reason for hiding this comment

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

Thought of yet another edge case 🔢
Will hopefully be easy.

cmake/AutoRevision.cmake Show resolved Hide resolved
Copy link
Contributor

@lmoureaux lmoureaux left a comment

Choose a reason for hiding this comment

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

Let's polish it once it hurts someone

@jwrober jwrober merged commit 961b736 into longturn:master Jan 21, 2022
@jwrober jwrober deleted the feature/auto-revision branch January 22, 2022 20:22
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.

Automatically set the version at build-time from CMakeLists.txt
2 participants