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

Add last git commit in 'About' #739

Closed
Speciesx opened this Issue Feb 6, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@Speciesx
Contributor

Speciesx commented Feb 6, 2016

ror_2016_02_06_18_52_45_291

@ulteq ulteq added the request label Feb 6, 2016

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Feb 7, 2016

Contributor

Minetest uses a nice versioning theme, it also checks if there were uncommited changes done to the code and adds a 'dirty' suffix if that's the case.

Contributor

Hiradur commented Feb 7, 2016

Minetest uses a nice versioning theme, it also checks if there were uncommited changes done to the code and adds a 'dirty' suffix if that's the case.

@mikadou mikadou changed the title from Add last git commint in 'About' to Add last git commit in 'About' Feb 7, 2016

@mikadou

This comment has been minimized.

Show comment
Hide comment
@mikadou

mikadou Feb 7, 2016

Contributor

This might be done with git-describe. Currently with 0.4.6.0-dev we are using the version number which is going to be released next and append the dev-suffix to indicate work in progress. With git-describe it is easier to use the last tagged release and append the checksum of the latest commit. In addition the dirty-suffix can be additionally appended if the code has been modified locally.

Contributor

mikadou commented Feb 7, 2016

This might be done with git-describe. Currently with 0.4.6.0-dev we are using the version number which is going to be released next and append the dev-suffix to indicate work in progress. With git-describe it is easier to use the last tagged release and append the checksum of the latest commit. In addition the dirty-suffix can be additionally appended if the code has been modified locally.

@mikadou

This comment has been minimized.

Show comment
Hide comment
@mikadou

mikadou Feb 7, 2016

Contributor

@Hiradur Are you talking about https://github.com/minetest/minetest/blob/master/CMakeLists.txt ?
They seem to specify the version inside their build system. They also provide an VERSION_EXTRA variable to append to the version string, but I don't see how the dirty suffix is automatically appended in case of modifications.

Another thing to consider is which files include the RoRVersion.h file. Because if this file changes with each commit every source file including it will be recompiled. Perhaps a global variable would be better in this case.

Contributor

mikadou commented Feb 7, 2016

@Hiradur Are you talking about https://github.com/minetest/minetest/blob/master/CMakeLists.txt ?
They seem to specify the version inside their build system. They also provide an VERSION_EXTRA variable to append to the version string, but I don't see how the dirty suffix is automatically appended in case of modifications.

Another thing to consider is which files include the RoRVersion.h file. Because if this file changes with each commit every source file including it will be recompiled. Perhaps a global variable would be better in this case.

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Feb 7, 2016

Contributor

Are you talking about https://github.com/minetest/minetest/blob/master/CMakeLists.txt ?

Yes, here is where the magic happens: https://github.com/minetest/minetest/blob/ffe291cb78fc7135034fe6456b2d7dfc3761dc52/cmake/Modules/GenerateVersion.cmake

Another thing to consider is which files include the RoRVersion.h file. Because if this file changes with each commit every source file including it will be recompiled.

I think the git hash should be determined at build time only and not be inside any file.

Contributor

Hiradur commented Feb 7, 2016

Are you talking about https://github.com/minetest/minetest/blob/master/CMakeLists.txt ?

Yes, here is where the magic happens: https://github.com/minetest/minetest/blob/ffe291cb78fc7135034fe6456b2d7dfc3761dc52/cmake/Modules/GenerateVersion.cmake

Another thing to consider is which files include the RoRVersion.h file. Because if this file changes with each commit every source file including it will be recompiled.

I think the git hash should be determined at build time only and not be inside any file.

@mikadou mikadou self-assigned this Feb 7, 2016

@mikadou

This comment has been minimized.

Show comment
Hide comment
@mikadou

mikadou Feb 7, 2016

Contributor

I understand, it is indeed a clever versioning theme. We should adapt this method 😼
I have it already half-way implemented, so I hope you doon't mind that I assigned the issue to me?

Contributor

mikadou commented Feb 7, 2016

I understand, it is indeed a clever versioning theme. We should adapt this method 😼
I have it already half-way implemented, so I hope you doon't mind that I assigned the issue to me?

@Hiradur

This comment has been minimized.

Show comment
Hide comment
@Hiradur

Hiradur Feb 8, 2016

Contributor

I hope you doon't mind that I assigned the issue to me?

Not at all, I'm too busy atm anyway

Contributor

Hiradur commented Feb 8, 2016

I hope you doon't mind that I assigned the issue to me?

Not at all, I'm too busy atm anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment