Fixed `xfw build` + added statistics + log
This commit is contained in:
parent
93653d8680
commit
b98a8419d4
|
@ -33,25 +33,40 @@
|
||||||
/* [1] Builds project's base file structure
|
/* [1] Builds project's base file structure
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
/* (1) Copy from src/files */
|
/* (1) Copy from src/files */
|
||||||
|
echo "(1) Building file structure\n";
|
||||||
shell_exec("cp -r ".__ROOT__."/src/files/* ".$this->root);
|
shell_exec("cp -r ".__ROOT__."/src/files/* ".$this->root);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* [2] Browse each package to load
|
/* [2] Browse each package to load
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
foreach($this->packages as $package=>$version){
|
echo "(2) Building packages\n";
|
||||||
$path = "/$package/$version";
|
$count = 1;
|
||||||
|
|
||||||
|
foreach($this->packages as $package=>$version){
|
||||||
|
$path = "$package/$version";
|
||||||
|
|
||||||
|
echo " ($count) $package:$version\n";
|
||||||
/* (1) Copy package folder if it exists */
|
/* (1) Copy package folder if it exists */
|
||||||
if( file_exists(__ROOT__."/src/packages$path/") && is_dir(__ROOT__."/src/packages$path/") && count(scandir(__ROOT__."/src/packages$path/")) > 2 )
|
if( file_exists(__ROOT__."/src/packages/$path") && is_dir(__ROOT__."/src/packages/$path") && count(scandir(__ROOT__."/src/packages/$path")) > 2 )
|
||||||
shell_exec("cp -r ".__ROOT__."/src/packages$path ".$this->root."/build/$package");
|
shell_exec("cp -r ".__ROOT__."/src/packages/$path ".$this->root."/build/$package");
|
||||||
|
|
||||||
/* (2) Copy package config if it exists */
|
/* (2) Copy package config if it exists */
|
||||||
if( file_exists(__ROOT__."/src/config$path/") && is_dir(__ROOT__."/src/config$path/") && count(scandir(__ROOT__."/src/config$path/")) > 2 )
|
if( file_exists(__ROOT__."/src/config/$path") && is_dir(__ROOT__."/src/config/$path") && count(scandir(__ROOT__."/src/config/$path")) > 2 )
|
||||||
shell_exec("cp -r ".__ROOT__."/src/config$path/* ".$this->root."/config/");
|
shell_exec("cp -r ".__ROOT__."/src/config/$path/* ".$this->root."/config/");
|
||||||
|
|
||||||
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "(*) Build finished\n";
|
||||||
|
|
||||||
|
/* [3] Start stats
|
||||||
|
=========================================================*/
|
||||||
|
echo "\n\nStatistics:\n";
|
||||||
|
echo shell_exec("du -hs ".$this->root."/*;");
|
||||||
|
echo "--\n";
|
||||||
|
echo shell_exec("du -hs ".$this->root."/;");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,69 +1,69 @@
|
||||||
{
|
{
|
||||||
"available": {
|
"available": {
|
||||||
"error": {
|
"error": {
|
||||||
"1.0": [],
|
"1.0": [],
|
||||||
"2.0": []
|
"2.0": []
|
||||||
},
|
},
|
||||||
"http": {
|
"http": {
|
||||||
"1.0": []
|
"1.0": []
|
||||||
},
|
},
|
||||||
"api": {
|
"api": {
|
||||||
"1.0": {
|
"1.0": {
|
||||||
"error": [
|
"error": [
|
||||||
"1.0"
|
"1.0"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"2.0": {
|
"2.0": {
|
||||||
"error": [
|
"error": [
|
||||||
"2.0"
|
"2.0"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"2.1": {
|
"2.2": {
|
||||||
"error": [
|
"error": [
|
||||||
"2.0"
|
"2.0"
|
||||||
],
|
],
|
||||||
"http": [
|
"http": [
|
||||||
"1.0"
|
"1.0"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"orm": {
|
"orm": {
|
||||||
"0.8.1": {
|
"0.8.1": {
|
||||||
"database": [
|
"database": [
|
||||||
"1.0"
|
"1.0"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"0.8.2": {
|
"0.8.2": {
|
||||||
"database": [
|
"database": [
|
||||||
"2.0"
|
"2.0"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"database": {
|
"database": {
|
||||||
"1.0": {
|
"1.0": {
|
||||||
"error": [
|
"error": [
|
||||||
"1.0"
|
"1.0"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"2.0": {
|
"2.0": {
|
||||||
"error": [
|
"error": [
|
||||||
"2.0"
|
"2.0"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lightdb": {
|
"lightdb": {
|
||||||
"1.0": []
|
"1.0": []
|
||||||
},
|
},
|
||||||
"router": {
|
"router": {
|
||||||
"1.0": []
|
"1.0": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"installed": {
|
"installed": {
|
||||||
"api": "2.1",
|
"api": "2.2",
|
||||||
"error": "2.0",
|
"error": "2.0",
|
||||||
"http": "1.0",
|
"http": "1.0",
|
||||||
"orm": "0.8.2",
|
"orm": "0.8.2",
|
||||||
"database": "2.0",
|
"database": "2.0",
|
||||||
"router": "1.0"
|
"router": "1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue