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

configure: enable read Git hash and date from file #3435

Merged
merged 8 commits into from
Mar 24, 2024

Conversation

nilason
Copy link
Contributor

@nilason nilason commented Feb 17, 2024

Enable configure to read GRASS_HEADERS_GIT_HASH and GRASS_HEADERS_GIT_DATE from a file include/VERSION_GIT (if it exist). That file can be generated in the process of packaging the release tarball, leading to consistent versioning even without Git.

The VERSION_GIT file is expected to contain:

cat include/VERSION_GIT
7d9bc3610
2024-02-17T15:36:05+00:00

First step in solving #3430.

@nilason nilason added this to the 8.4.0 milestone Feb 17, 2024
echoix
echoix previously approved these changes Feb 17, 2024
Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

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

I approve the concept, and the overall implementation. I cannot confirm that it is correctly implemented though.

@nilason
Copy link
Contributor Author

nilason commented Feb 17, 2024

Updated with fixed tests.

if test "$GIT" != "no" ; then only checks for presence of git the command/program.

@nilason
Copy link
Contributor Author

nilason commented Feb 18, 2024

Added include/VERSION_GIT-file generation script.
(Initially I planned to have this code in the workflow file, but decided it is better to have it in source).

@landam
Copy link
Member

landam commented Feb 20, 2024

I tested this PR by creating include/VERSION_GIT and than removing .git directory (which is not located in tarball):

checking for include/VERSION_GIT... yes
fatal: not a git repository (or any of the parent directories): .git
grep VERSION_GIT include/Make/Platform.make
GRASS_VERSION_GIT   = exported

In this case Git hash should be propagated from the file @nilason right?

@nilason
Copy link
Contributor Author

nilason commented Feb 20, 2024

I tested this PR by creating include/VERSION_GIT and than removing .git directory (which is not located in tarball):

checking for include/VERSION_GIT... yes
fatal: not a git repository (or any of the parent directories): .git
grep VERSION_GIT include/Make/Platform.make
GRASS_VERSION_GIT   = exported

In this case Git hash should be propagated from the file @nilason right?

True, corrected this with d9bca18.

@nilason
Copy link
Contributor Author

nilason commented Mar 21, 2024

Any thoughts on this one, @landam , @neteler , anyone?

@nilason nilason enabled auto-merge (squash) March 24, 2024 08:49
Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

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

My only worries were validated by multiple other members in the comments. So, I consider it good to go!

@nilason nilason merged commit 391e934 into OSGeo:main Mar 24, 2024
27 checks passed
@nilason nilason deleted the fix_version_release branch May 15, 2024 09:15
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.

4 participants