mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
测试构建
This commit is contained in:
1 parent
27cfe81e31
commit
9156fa3a9b
6 files changed
+80
-48
No files matched your search
@@ -0,0 +1,10 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const child = require('child_process');
|
||||
|
||||
exports.prebuild = async function prebuild() {
|
||||
if (!fs.existsSync(path.resolve(__dirname, 'HydroJudger'))) {
|
||||
const res = child.spawnSync('git clone https://github.com/hydro-dev/HydroJudger.git');
|
||||
if (res.error) throw res.error;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
exports.prebuild = async function prebuild() {
|
||||
if (!fs.existsSync(path.resolve(__dirname, 'file', 'executorserver'))) {
|
||||
if (!fs.existsSync(path.resolve(__dirname, 'file'))) {
|
||||
fs.mkdirSync(path.resolve(__dirname, 'file'));
|
||||
}
|
||||
// TODO download executorserver
|
||||
}
|
||||
};
|
||||
File renamed without changes.
@@ -1,7 +1,8 @@
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
const child = require('child_process');
|
||||
|
||||
const p = child.spawn(path.resolve(os.tmpdir(), 'hydro', 'sandbox-linux', 'executorserver', ['-silent']);
|
||||
const p = child.spawn(path.resolve(os.tmpdir(), 'hydro', 'sandbox-linux-amd64', 'executorserver', ['-silent']));
|
||||
if (!p.stdout) throw new Error('Cannot start executorserver');
|
||||
else {
|
||||
p.stdout.on('data', (data) => {
|
||||
@@ -3,7 +3,7 @@ const path = require('path');
|
||||
|
||||
const root = (name) => path.resolve(__dirname, name);
|
||||
|
||||
exports.prebuild = () => {
|
||||
exports.prebuild = async () => {
|
||||
const pages = fs.readdirSync(root('raw'));
|
||||
const res = {};
|
||||
for (const page of pages) {
|
||||
|
||||
Reference in new issue
Block a user