mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
prepublish for geoip
This commit is contained in:
1 parent
2c2ce194a0
commit
79362ce849
2 files changed
+5
-9
No files matched your search
+1
-8
@@ -2,9 +2,6 @@
|
|||||||
/* eslint-disable consistent-return */
|
/* eslint-disable consistent-return */
|
||||||
/* eslint-disable no-await-in-loop */
|
/* eslint-disable no-await-in-loop */
|
||||||
/* eslint-disable import/no-dynamic-require */
|
/* eslint-disable import/no-dynamic-require */
|
||||||
import fs from 'fs';
|
|
||||||
import path from 'path';
|
|
||||||
import { spawnSync } from 'child_process';
|
|
||||||
import { gt } from 'semver';
|
import { gt } from 'semver';
|
||||||
import latest from 'latest-version';
|
import latest from 'latest-version';
|
||||||
import ora from 'ora';
|
import ora from 'ora';
|
||||||
@@ -38,11 +35,7 @@ if (CI && (GITHUB_REF !== 'refs/heads/master' || GITHUB_EVENT_NAME !== 'push'))
|
|||||||
meta = require(`../${name}/package.json`);
|
meta = require(`../${name}/package.json`);
|
||||||
if (!meta.private) {
|
if (!meta.private) {
|
||||||
const version = await latest(meta.name);
|
const version = await latest(meta.name);
|
||||||
if (gt(meta.version, version)) {
|
if (gt(meta.version, version)) bumpMap[name] = meta.version;
|
||||||
const prepublish = path.resolve(process.cwd(), 'packages', name, 'prepublish.sh');
|
|
||||||
if (fs.existsSync(prepublish)) spawnSync(prepublish);
|
|
||||||
bumpMap[name] = meta.version;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/geoip",
|
"name": "@hydrooj/geoip",
|
||||||
"version": "1.1.14",
|
"version": "1.1.15",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||||
"author": "undefined <masnn0@outlook.com>",
|
"author": "undefined <masnn0@outlook.com>",
|
||||||
@@ -8,6 +8,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"maxmind": "^4.1.3"
|
"maxmind": "^4.1.3"
|
||||||
},
|
},
|
||||||
|
"scripts": {
|
||||||
|
"prepublish": "./prepublish.sh"
|
||||||
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"hydrooj": "^2.12.0||^2.13.0"
|
"hydrooj": "^2.12.0||^2.13.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user