This repository has been archived on 2021-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
auth-client-helper/jenkins.js
2020-05-17 17:31:15 +02:00

30 lines
713 B
JavaScript

/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of auth-client-helper which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, May 2020
*/
'use strict';
const https = require ('https');
const fs = require ('fs');
const { execSync: exec_sync } = require ('child_process');
const run_file = fs.createWriteStream ('.jenkins.run.js');
const [
,, ...args
] = process.argv;
run_file.on ('close', () => {
exec_sync (`node .jenkins.run.js ${args.join (' ')}`, { stdio: 'inherit' });
});
https.get (
'https://git.scode.ovh/Timo/standard/raw/branch/master/jenkins.run.js',
(msg) => {
msg.pipe (run_file);
}
);