1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-17 00:33:33 +00:00

updated process.versions

This commit is contained in:
Bryan Roe
2020-11-10 23:07:56 -08:00
parent 58a7305920
commit 1ec352f96b

View File

@@ -1274,16 +1274,17 @@ void ILibDuktape_ScriptContainer_Process_Init(duk_context *ctx, char **argList)
duk_push_string(ctx, SOURCE_COMMIT_DATE); // [func][date] duk_push_string(ctx, SOURCE_COMMIT_DATE); // [func][date]
if (duk_pcall(ctx, 1) == 0) if (duk_pcall(ctx, 1) == 0)
{ {
if (SOURCE_COMMIT_HASH != NULL) duk_put_prop_string(ctx, -2, "commitDate");
{
duk_push_string(ctx, SOURCE_COMMIT_HASH); duk_put_prop_string(ctx, -2, "commitHash");
}
duk_put_prop_string(ctx, -2, "meshAgent");
} }
else else
{ {
duk_pop(ctx); duk_pop(ctx);
} }
if (SOURCE_COMMIT_HASH != NULL)
{
duk_push_string(ctx, SOURCE_COMMIT_HASH); duk_put_prop_string(ctx, -2, "commitHash");
}
duk_push_sprintf(ctx, "%s, %s", __TIME__, __DATE__); duk_put_prop_string(ctx, -2, "compileTime");
} }
ILibDuktape_CreateReadonlyProperty(ctx, "versions"); ILibDuktape_CreateReadonlyProperty(ctx, "versions");