mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 07:43:50 +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]
|
||||
if (duk_pcall(ctx, 1) == 0)
|
||||
{
|
||||
if (SOURCE_COMMIT_HASH != NULL)
|
||||
{
|
||||
duk_push_string(ctx, SOURCE_COMMIT_HASH); duk_put_prop_string(ctx, -2, "commitHash");
|
||||
}
|
||||
duk_put_prop_string(ctx, -2, "meshAgent");
|
||||
duk_put_prop_string(ctx, -2, "commitDate");
|
||||
}
|
||||
else
|
||||
{
|
||||
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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user