Fixed some build server related bugs

This commit is contained in:
WolverinDEV 2019-07-05 23:09:10 +02:00
parent 2a44741d01
commit 4965c080ce
3 changed files with 9 additions and 6 deletions

View File

@ -193,16 +193,15 @@ options.ignore = path => {
}; };
async function copy_striped(source: string, target: string, symbol_directory: string) { async function copy_striped(source: string, target: string, symbol_directory: string) {
const copy_file = util.promisify(fs.copyFile); const exec = (command, options) => new Promise<{ stdout: Buffer | string, stderr: Buffer | string}>((resolve, reject) => child_process.exec(command, options, (error, out, err) => error ? reject(error) : resolve({stdout: out, stderr: err})));
const exec = util.promisify(child_process.exec);
if(process.argv[2] == "win32") { if(process.argv[2] == "win32") {
await copy_file(source, target); await fs.copy(source, target);
return; return;
} }
if(process.argv[2] != "linux") throw "invalid target type"; if(process.argv[2] != "linux") throw "invalid target type";
await copy_file(source, target); await fs.copy(source, target);
{ {
const symbols_command = await exec("dump_syms " + target, { const symbols_command = await exec("dump_syms " + target, {
@ -317,7 +316,7 @@ let path;
new Promise((resolve, reject) => packager(options, (err, appPaths) => err ? reject(err) : resolve(appPaths))).then(async app_paths => { new Promise((resolve, reject) => packager(options, (err, appPaths) => err ? reject(err) : resolve(appPaths))).then(async app_paths => {
console.log("Copying changelog file!"); console.log("Copying changelog file!");
/* We dont have promisify in our build system */ /* We dont have promisify in our build system */
fs.copyFileSync(path_helper.join(options.dir, "github", "ChangeLog.txt"), path_helper.join(app_paths[0], "ChangeLog.txt")); await fs.copy(path_helper.join(options.dir, "github", "ChangeLog.txt"), path_helper.join(app_paths[0], "ChangeLog.txt"));
return app_paths; return app_paths;
}).then(async app_paths => { }).then(async app_paths => {
await create_native_addons(path_helper.join(app_paths[0], "resources", "natives"), "build/symbols"); await create_native_addons(path_helper.join(app_paths[0], "resources", "natives"), "build/symbols");
@ -340,6 +339,7 @@ new Promise((resolve, reject) => packager(options, (err, appPaths) => err ? reje
}).then(() => { }).then(() => {
console.log("Package created"); console.log("Package created");
}).catch(error => { }).catch(error => {
console.error(error);
console.error("Failed to create package!"); console.error("Failed to create package!");
process.exit(1); process.exit(1);
}); });

View File

@ -60,6 +60,9 @@ function compile_native() {
eval ${_command} eval ${_command}
check_err_exit ${project_name} "Failed create build targets!" check_err_exit ${project_name} "Failed create build targets!"
cmake --build `pwd` --target update_installer -- -j 12
check_err_exit ${project_name} "Failed build teaclient update installer!"
cmake --build `pwd` --target teaclient_connection -- -j 12 cmake --build `pwd` --target teaclient_connection -- -j 12
check_err_exit ${project_name} "Failed build teaclient connection!" check_err_exit ${project_name} "Failed build teaclient connection!"

View File

@ -1,6 +1,6 @@
{ {
"name": "TeaClient", "name": "TeaClient",
"version": "1.3.5", "version": "1.3.6",
"description": "", "description": "",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {