1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-11 13:53:37 +00:00

updated '-info- to contain commit hash and date if available

This commit is contained in:
Bryan Roe
2019-05-09 15:27:56 -07:00
parent 2015b668f2
commit 88266aa7ad
2 changed files with 12 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ limitations under the License.
#include "microscript/ILibDuktape_ScriptContainer.h" #include "microscript/ILibDuktape_ScriptContainer.h"
#include "microstack/ILibCrypto.h" #include "microstack/ILibCrypto.h"
#include "microscript/ILibDuktape_Commit.h"
MeshAgentHostContainer *agentHost = NULL; MeshAgentHostContainer *agentHost = NULL;
@@ -131,6 +132,11 @@ char* crashMemory = ILib_POSIX_InstallCrashHandler(argv[0]);
if (argc > 1 && strcasecmp(argv[1], "-info") == 0) if (argc > 1 && strcasecmp(argv[1], "-info") == 0)
{ {
printf("Compiled on: %s, %s\n", __TIME__, __DATE__); printf("Compiled on: %s, %s\n", __TIME__, __DATE__);
if (SOURCE_COMMIT_HASH != NULL && SOURCE_COMMIT_DATE != NULL)
{
printf(" Commit Hash: %s\n", SOURCE_COMMIT_HASH);
printf(" Commit Date: %s\n", SOURCE_COMMIT_DATE);
}
#ifndef MICROSTACK_NOTLS #ifndef MICROSTACK_NOTLS
printf("Using %s\n", SSLeay_version(SSLEAY_VERSION)); printf("Using %s\n", SSLeay_version(SSLEAY_VERSION));
#endif #endif

View File

@@ -35,6 +35,7 @@ limitations under the License.
#include "microstack/ILibCrypto.h" #include "microstack/ILibCrypto.h"
#include "meshcore/agentcore.h" #include "meshcore/agentcore.h"
#include "microscript/ILibDuktape_ScriptContainer.h" #include "microscript/ILibDuktape_ScriptContainer.h"
#include "microscript/ILibDuktape_Commit.h"
#include <shellscalingapi.h> #include <shellscalingapi.h>
#ifndef _MINCORE #ifndef _MINCORE
@@ -936,6 +937,11 @@ int main(int argc, char* argv[])
if (argc > 1 && strcasecmp(argv[1], "-info") == 0) if (argc > 1 && strcasecmp(argv[1], "-info") == 0)
{ {
printf("Compiled on: %s, %s\n", __TIME__, __DATE__); printf("Compiled on: %s, %s\n", __TIME__, __DATE__);
if (SOURCE_COMMIT_HASH != NULL && SOURCE_COMMIT_DATE != NULL)
{
printf(" Commit Hash: %s\n", SOURCE_COMMIT_HASH);
printf(" Commit Date: %s\n", SOURCE_COMMIT_DATE);
}
#ifndef MICROSTACK_NOTLS #ifndef MICROSTACK_NOTLS
printf("Using %s\n", SSLeay_version(SSLEAY_VERSION)); printf("Using %s\n", SSLeay_version(SSLEAY_VERSION));
#endif #endif