mirror of https://github.com/certd/certd
chore: 1
parent
ed8a54a2bc
commit
322875d241
12
deploy.js
12
deploy.js
|
@ -1,12 +1,22 @@
|
||||||
import http from 'axios'
|
import http from 'axios'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
|
|
||||||
//读取 packages/core/pipline/package.json的版本号
|
//读取 packages/core/pipline/package.json的版本号
|
||||||
import {default as packageJson} from './packages/core/pipeline/package.json' assert { type: "json" };
|
import {default as packageJson} from './packages/core/pipeline/package.json' assert { type: "json" };
|
||||||
|
|
||||||
const certdVersion = packageJson.version
|
const certdVersion = packageJson.version
|
||||||
console.log("certdVersion", certdVersion)
|
console.log("certdVersion", certdVersion)
|
||||||
|
|
||||||
|
|
||||||
|
const gitAdd = fs.readAsText("./node_modules/@lerna-lite/version/dist/lib/git-add.js")
|
||||||
|
if(gitAdd.indexOf("('git', ['add', '.']") > -1){
|
||||||
|
console.log("git-add 已经修改过了")
|
||||||
|
}else{
|
||||||
|
console.log("git-add 没有修改过")
|
||||||
|
fs.writeTextFile("./node_modules/@lerna-lite/version/dist/lib/git-add.js", gitAdd.replace("('git', ['add', '--', ...files]", "('git', ['add', '.']"))
|
||||||
|
console.log("git-add 修改成功")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 同步npmmirror的包
|
// 同步npmmirror的包
|
||||||
async function getPackages(directoryPath) {
|
async function getPackages(directoryPath) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
@ -156,6 +156,9 @@ export class UploadCertToHostPlugin extends AbstractTaskPlugin {
|
||||||
keyPath
|
keyPath
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.logger.error(`上传失败:${e.message}`);
|
||||||
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
//删除临时文件
|
//删除临时文件
|
||||||
this.logger.info('删除临时文件');
|
this.logger.info('删除临时文件');
|
||||||
|
|
Loading…
Reference in New Issue