Revamp version tagging, remove ugly suffix on git hash. Refs #571

* Tacking -official onto the git hash was a hack only needed on windows,
  and since we want more information it doesn't scale.
* Instead we track anything we need to know about the version in
  separate variables, like whether it's a stable build or a nightly/
  local build. Or if it's built by a downstream distribution then the
  version number for the downstream build.
This commit is contained in:
baldurk
2017-04-27 19:15:31 +01:00
parent 4199a857f5
commit ae50fa99ee
17 changed files with 213 additions and 106 deletions
+10 -2
View File
@@ -26,6 +26,7 @@
#include "renderdoccmd.h"
#include <app/renderdoc_app.h>
#include <replay/renderdoc_replay.h>
#include <replay/version.h>
#include <string>
using std::string;
@@ -162,12 +163,19 @@ struct VersionCommand : public Command
virtual bool IsCaptureCommand() { return false; }
virtual int Execute(cmdline::parser &parser, const CaptureOptions &)
{
std::cout << "renderdoccmd " << (sizeof(uintptr_t) == sizeof(uint64_t) ? "x64 " : "x86 ")
<< RENDERDOC_GetVersionString() << "-" << RENDERDOC_GetCommitHash() << std::endl;
std::cout << "renderdoccmd " << (sizeof(uintptr_t) == sizeof(uint64_t) ? "x64" : "x86")
<< " v" MAJOR_MINOR_VERSION_STRING << " built from " << GIT_COMMIT_HASH << std::endl;
#if defined(DISTRIBUTION_VERSION)
std::cout << "Packaged for " << DISTRIBUTION_NAME << " (" << DISTRIBUTION_VERSION << ") - "
<< DISTRIBUTION_CONTACT << std::endl;
#endif
for(size_t i = 0; i < version_lines.size(); i++)
std::cout << version_lines[i] << std::endl;
std::cout << std::endl;
return 0;
}
};