standard/asset_jenkins.js

29 lines
691 B
JavaScript

/*
* Copyright (C) SapphireCode - All Rights Reserved
* This file is part of Standard which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@sapphirecode.ovh>, May 2020
*/
'use strict';
module.exports = `'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');
run_file.on ('close', () => {
exec_sync ('node .jenkins.run.js', { stdio: 'inherit' });
});
https.request (
'https://git.scode.ovh/Timo/standard/raw/branch/master/jenkins.run.js',
(msg) => {
msg.pipe (run_file);
}
);
`;