Skip to content

Commit

Permalink
Data improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
conmaster2112 committed Mar 17, 2024
1 parent 05a62f7 commit 46e1cc3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bin/
node_modules/
node_modules/
private/
test/
3 changes: 3 additions & 0 deletions dev.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
md test
cd test
node ../src/main.js
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "src/main.js",
"module": "CommonJS",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "powershell ./dev.ps1"
},
"repository": {
"type": "git",
Expand Down
21 changes: 17 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,31 @@ const declarations = "./script_types";
const version_registred = {
"build-version":"1.0.0.0",
"version":"1.0.0.0",
"glags":[
"generated_types"
]
"flags":[
"generated_types",
"script_module_list"
],
"script_modules":[]
};
const OSSYSTEM = os.platform() === "win32"?"win":"linux";


CompareLatestVersions();


async function Preload(v){
console.log("Loggin as 'Documentation Manager Bot'")
await System('git config --global user.name "Documentation Manager Bot"');
await System('git config --global user.email "[email protected]"');
await System(`git checkout ${v}`);
}

async function Finish(v,version){
console.log("Versions registred");
await promises.writeFile("exist.json",JSON.stringify(version_registred,null," "));
console.log("Loggin as 'Documentation Manager Bot'")
await System('git config --global user.name "Documentation Manager Bot"');
await System('git config --global user.email "[email protected]"');
await System(`git checkout ${v}`);
console.log("Commit");
await System("git add .");
await System(`git commit -m \"New ${v} v${v==="stable"?GetEngine(version):version}\"`);
Expand Down Expand Up @@ -91,6 +101,7 @@ async function runDocs(v,version){
DoFiles(docs_generated + "/script_modules",declarations, (file, data)=>{
const Json = JSON.parse(data.toString());
const script_module = new ScriptModule(Json);
version_registred.script_modules.push(file);
return [file.replace(".json",".d.ts"),script_module.toString()];
}).then(()=>Finish(v,version)).catch(er=>{
global.console.error(er.message);
Expand Down Expand Up @@ -146,6 +157,7 @@ async function CompareLatestVersions(){
})
_preview = false;
console.log("New Stable Version Found: " + engine);
await Preload("stable");
Generate("stable",stable);
return;
}
Expand All @@ -156,6 +168,7 @@ async function CompareLatestVersions(){
})
_preview = true;
console.log("New Stable Version Found: " + preview);
await Preload("preview");
Generate("preview",preview);
return;
}
Expand Down

0 comments on commit 46e1cc3

Please sign in to comment.