This commit is contained in:
Timo Hocker 2020-05-15 13:07:39 +02:00
parent d6a9b3689c
commit 7c7ede2f68
2 changed files with 13 additions and 4 deletions

View File

@ -5,18 +5,23 @@
* Created by Timo Hocker <timo@sapphirecode.ovh>, May 2020 * Created by Timo Hocker <timo@sapphirecode.ovh>, May 2020
*/ */
/* eslint-disable max-len */
'use strict'; 'use strict';
module.exports = `'use strict'; module.exports = `'use strict';
const https = require ('https'); const https = require ('https');
const fs = require ('fs'); const fs = require ('fs');
const { fork } = require ('child_process'); const { execSync: exec_sync } = require ('child_process');
const run_file = fs.createWriteStream ('.jenkins.run.js'); const run_file = fs.createWriteStream ('.jenkins.run.js');
const [
,, ...args
] = process.argv;
run_file.on ('close', () => { run_file.on ('close', () => {
fork ('.jenkins.run.js'); exec_sync (\`node .jenkins.run.js \${args.join (' ')}\`, { stdio: 'inherit' });
}); });
https.get ( https.get (

View File

@ -2,12 +2,16 @@
const https = require ('https'); const https = require ('https');
const fs = require ('fs'); const fs = require ('fs');
const { fork } = require ('child_process'); const { execSync: exec_sync } = require ('child_process');
const run_file = fs.createWriteStream ('.jenkins.run.js'); const run_file = fs.createWriteStream ('.jenkins.run.js');
const [
,, ...args
] = process.argv;
run_file.on ('close', () => { run_file.on ('close', () => {
fork ('.jenkins.run.js'); exec_sync (`node .jenkins.run.js ${args.join (' ')}`, { stdio: 'inherit' });
}); });
https.get ( https.get (