mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-17 08:43:21 +00:00
updated process.versions
This commit is contained in:
@@ -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");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user