-
-
Notifications
You must be signed in to change notification settings - Fork 617
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
Use git to retrieve version instead of manually change PREMAKE_VERSION
.
#2405
base: master
Are you sure you want to change the base?
Conversation
premake5.lua
Outdated
local function autoversion_h() | ||
local git_tag, errorCode = os.outputof("git describe --tag --always") | ||
if errorCode == 0 then | ||
print("git description: ", git_tag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this debug print and should it be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see it more as information than debugging.
Overall looks good and great improvement over the current way of handling the version string. But long-term (maybe as future PR) I think it makes sense to provide a core API for this task (generating a config file), which is a pretty common requirement for many projects. We can take a look at inspiration from CMake's configure_file. |
A simple function taking "template_path", "output_path" and a table for mapping seems sufficient. But outside scope of that PR IMO. |
As previously discussed, I'm not a fan of this approach. Here are some of my issues:
|
I don't see a way to "fix" 1. and 2. Just noticed that "script/package.lua" would be broken too with that change (and can/should be fixed). |
e56ef4e
to
5d7b959
Compare
|
5d7b959
to
0f91939
Compare
What does this PR do?
Handle
PREMAKE_VERSION
from git tagHow does this PR change Premake's behavior?
No behavior changed.
Anything else we should know?
gitintegration
setup, so premake5 is launched at each checkout.Did you check all the boxes?
closes #XXXX
in comment to auto-close issue when PR is merged)