standard/asset_jenkins.js

29 lines
640 B
JavaScript
Raw Normal View History

2020-05-04 20:47:01 +02:00
/*
* Copyright (C) SapphireCode - All Rights Reserved
* This file is part of Standard which is released under MIT.
* See file 'LICENSE' for full license details.
2020-05-06 07:50:59 +02:00
* Created by Timo Hocker <timo@sapphirecode.ovh>, May 2020
2020-05-04 20:47:01 +02:00
*/
2020-05-04 12:00:18 +02:00
'use strict';
2020-05-15 12:56:20 +02:00
module.exports = `'use strict';
2020-05-04 12:00:18 +02:00
2020-05-15 12:56:20 +02:00
const https = require ('https');
2020-05-04 12:00:18 +02:00
const fs = require ('fs');
2020-05-15 13:02:11 +02:00
const { fork } = require ('child_process');
2020-05-12 10:02:18 +02:00
2020-05-15 12:56:20 +02:00
const run_file = fs.createWriteStream ('.jenkins.run.js');
2020-05-12 10:02:18 +02:00
2020-05-15 12:56:20 +02:00
run_file.on ('close', () => {
2020-05-15 13:02:11 +02:00
fork ('.jenkins.run.js');
2020-05-15 12:56:20 +02:00
});
2020-05-15 13:02:11 +02:00
https.get (
2020-05-15 12:56:20 +02:00
'https://git.scode.ovh/Timo/standard/raw/branch/master/jenkins.run.js',
(msg) => {
msg.pipe (run_file);
2020-05-12 10:02:18 +02:00
}
2020-05-15 12:56:20 +02:00
);
2020-05-04 12:00:18 +02:00
`;