From e1f5fc6a0c139eae035d20facb95914642cad50c Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 15 Feb 2012 00:06:25 -0500 Subject: Remove revision numbers as they're only ever set by Config reading git since we've switched off of SVN. Instead just use the hash for the current head when building. Also recheck the hash on every make not just Config. --- src/misc.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/misc.cpp') diff --git a/src/misc.cpp b/src/misc.cpp index bb8658a56..5f36358d3 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -769,12 +769,16 @@ const Anope::string Anope::LastError() ModuleVersion Module::GetVersion() const { - return ModuleVersion(VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD); + return ModuleVersion(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); } Anope::string Anope::Version() { - return stringify(VERSION_MAJOR) + "." + stringify(VERSION_MINOR) + "." + stringify(VERSION_PATCH) + VERSION_EXTRA + " (" + stringify(VERSION_BUILD) + ")"; +#ifdef VERSION_GIT + return stringify(VERSION_MAJOR) + "." + stringify(VERSION_MINOR) + "." + stringify(VERSION_PATCH) + VERSION_EXTRA + " (" + VERSION_GIT + ")"; +#else + return stringify(VERSION_MAJOR) + "." + stringify(VERSION_MINOR) + "." + stringify(VERSION_PATCH) + VERSION_EXTRA; +#endif } Anope::string Anope::VersionShort() @@ -790,7 +794,6 @@ Anope::string Anope::VersionBuildString() int Anope::VersionMajor() { return VERSION_MAJOR; } int Anope::VersionMinor() { return VERSION_MINOR; } int Anope::VersionPatch() { return VERSION_PATCH; } -int Anope::VersionBuild() { return VERSION_BUILD; } /** * Normalize buffer stripping control characters and colors -- cgit