-
-
Notifications
You must be signed in to change notification settings - Fork 619
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
Post Release 5.0.0-beta3 Cleanup #2323
Post Release 5.0.0-beta3 Cleanup #2323
Conversation
313364d
to
b5871b8
Compare
@@ -12,8 +12,8 @@ | |||
#include <stdint.h> | |||
#include <stdlib.h> | |||
|
|||
#define PREMAKE_VERSION "5.0.0-beta3" | |||
#define PREMAKE_COPYRIGHT "Copyright (C) 2002-2021 Jess Perkins and the Premake Project" | |||
#define PREMAKE_VERSION "5.0.0-dev" |
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.
How about having version.h.in using git describe
?
Something like:
local function template(file_in, dict, file_out)
local content = io.readfile(file_in)
for k,v in pairs(dict) do
content = content:gsub(k, v)
end
os.mkdir(path.getdirectory(file_out))
local f, err = os.writefile_ifnotequal(content, file_out)
if (f == 0) then
-- file not modified
elseif (f < 0) then
error(err, 0)
return false
elseif (f > 0) then
print("Generated " .. file_out)
end
return true
end
local function autoversion_h()
local git_tag, errorCode = os.outputof("git describe --tag --always")
if errorCode ~= 0 then
error("`git describe --tag` failed with error code", errorCode, git_tag)
end
print("git description: ", git_tag)
return template(
"src/autoversion.h.in",
{["@GIT_DESC@"] = git_tag},
path.join("solution", _ACTION, "autoversion.h")
end
gitintegration "Always" -- to add git hook
if _ACTION ~= nil then -- Do nothing for premake --version :-)
autoversion_h()
end
So no longer need to modify the code, it just use 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.
Let's table this for a follow up, just so we can complete the current release cycle under the existing release guide. Then we can discuss updating this for the future in maybe a GH discussion?
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.
No pb to postpone the discussion (I approved BTW).
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.
Unfortunately, you're not a reviewer with write access so I have to wait for another review :(
Thanks @starkos :) |
Reverts the version back to 5.0.0-dev in the build, updates copyright year in
src/host/premake.h