mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-31 07:17:31 +01:00
17 lines
No EOL
357 B
Text
17 lines
No EOL
357 B
Text
function check_version(path, key = "version") {
|
|
if(!file_exists_empty(path)) {
|
|
var str = {};
|
|
str[$ key] = BUILD_NUMBER;
|
|
json_save_struct(path, str);
|
|
return true;
|
|
}
|
|
|
|
if(TESTING) return true;
|
|
|
|
var res = json_load_struct(path);
|
|
var chk = res[$ key] ?? 0;
|
|
res[$ key] = BUILD_NUMBER;
|
|
json_save_struct(path, res);
|
|
|
|
return chk != BUILD_NUMBER;
|
|
} |