mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
修复hydrojudge模块加载异常的问题
This commit is contained in:
1 parent
a8bdfa8f30
commit
a01383c1c1
5 files changed
+10
-5
No files matched your search
+5
-2
@@ -4,6 +4,7 @@
|
||||
/* eslint-disable import/no-dynamic-require */
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { spawnSync } from 'child_process';
|
||||
import { gt } from 'semver';
|
||||
import latest from 'latest-version';
|
||||
import ora from 'ora';
|
||||
@@ -39,11 +40,13 @@ if (CI && (GITHUB_REF !== 'refs/heads/master' || GITHUB_EVENT_NAME !== 'push'))
|
||||
const version = await latest(meta.name);
|
||||
if (gt(meta.version, version)) {
|
||||
const prepublish = path.resolve(process.cwd(), 'packages', name, 'prepublish.sh');
|
||||
if (fs.existsSync(prepublish)) await spawnAsync(prepublish);
|
||||
if (fs.existsSync(prepublish)) spawnSync(prepublish);
|
||||
bumpMap[name] = meta.version;
|
||||
}
|
||||
}
|
||||
} catch { /* pass */ }
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
spinner.text = `Loading workspaces (${++progress}/${folders.length})`;
|
||||
}));
|
||||
spinner.succeed();
|
||||
|
||||
Reference in new issue
Block a user