mirror of https://github.com/certd/certd
chore:
parent
83d0209775
commit
741172fd98
|
@ -15,7 +15,7 @@
|
||||||
"publish": "npm run prepublishOnly1 && lerna publish --conventional-commits --create-release github && npm run afterpublishOnly && npm run deploy1",
|
"publish": "npm run prepublishOnly1 && lerna publish --conventional-commits --create-release github && npm run afterpublishOnly && npm run deploy1",
|
||||||
"afterpublishOnly": "",
|
"afterpublishOnly": "",
|
||||||
"prepublishOnly1": "npm run check && npm run before-build && lerna run build ",
|
"prepublishOnly1": "npm run check && npm run before-build && lerna run build ",
|
||||||
"before-build": "cd ./packages/core/acme-client && time /t >build.md && git add build.trigger && git commit -m \\\"build: prepare to build\\\"",
|
"before-build": "cd ./packages/core/acme-client && time /t >build.md && git add . && git commit -m \\\"build: prepare to build\\\"",
|
||||||
"deploy1": "node --experimental-json-modules deploy.js ",
|
"deploy1": "node --experimental-json-modules deploy.js ",
|
||||||
"check": "node --experimental-json-modules publish-check.js",
|
"check": "node --experimental-json-modules publish-check.js",
|
||||||
"init": "lerna run build"
|
"init": "lerna run build"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
03:10
|
02:16
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
|
import childProcess from 'child_process';
|
||||||
function check(){
|
function check(){
|
||||||
const gitAdd = fs.readFileSync("./node_modules/@lerna-lite/version/dist/lib/git-add.js","utf-8")
|
const gitAdd = fs.readFileSync("./node_modules/@lerna-lite/version/dist/lib/git-add.js","utf-8")
|
||||||
if(gitAdd.indexOf("('git', ['add', '.']") > -1){
|
if(gitAdd.indexOf("('git', ['add', '.']") > -1){
|
||||||
|
@ -10,7 +11,13 @@ function check(){
|
||||||
}
|
}
|
||||||
|
|
||||||
//GH_TOKEN
|
//GH_TOKEN
|
||||||
|
console.log("检查 GH_TOKEN")
|
||||||
|
if(process.env.npm_config_gh_token){
|
||||||
|
process.env.GH_TOKEN = process.env.npm_config_gh_token
|
||||||
|
childProcess.exec("set GH_TOKEN="+process.env.npm_config_gh_token)
|
||||||
|
}
|
||||||
if(!process.env.GH_TOKEN){
|
if(!process.env.GH_TOKEN){
|
||||||
|
console.log(process.env)
|
||||||
console.error("GH_TOKEN 未设置")
|
console.error("GH_TOKEN 未设置")
|
||||||
throw new Error("GH_TOKEN 未设置")
|
throw new Error("GH_TOKEN 未设置")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue