prepublish for geoip

This commit is contained in:
undefined committed 2020-09-06 16:44:57 +08:00
1 parent 2c2ce194a0
commit 79362ce849
2 files changed
+5 -9

No files matched your search

+1 -8
View File
@@ -2,9 +2,6 @@
/* eslint-disable consistent-return */
/* eslint-disable no-await-in-loop */
/* 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';
@@ -38,11 +35,7 @@ if (CI && (GITHUB_REF !== 'refs/heads/master' || GITHUB_EVENT_NAME !== 'push'))
meta = require(`../${name}/package.json`);
if (!meta.private) {
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)) spawnSync(prepublish);
bumpMap[name] = meta.version;
}
if (gt(meta.version, version)) bumpMap[name] = meta.version;
}
} catch (e) {
console.error(e);
+4 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/geoip",
"version": "1.1.14",
"version": "1.1.15",
"main": "package.json",
"repository": "git@github.com:hydro-dev/Hydro.git",
"author": "undefined <masnn0@outlook.com>",
@@ -8,6 +8,9 @@
"dependencies": {
"maxmind": "^4.1.3"
},
"scripts": {
"prepublish": "./prepublish.sh"
},
"peerDependencies": {
"hydrooj": "^2.12.0||^2.13.0"
}