feat(config): add post-release event file
This commit is contained in:
16
src/index.ts
16
src/index.ts
@@ -473,6 +473,22 @@ program
|
||||
? [`-s`, `v${version}`, `-m`, `"v${version}"`]
|
||||
: [`-a`, `v${version}`, `-m`, `"v${version}"`]
|
||||
);
|
||||
|
||||
const postReleaseFile = (
|
||||
await fs.promises.readFile(
|
||||
path.join(process.cwd(), ".rczrc.postrelease.js")
|
||||
)
|
||||
).toString();
|
||||
|
||||
if (postReleaseFile) {
|
||||
const postReleaseScript = `
|
||||
const __NEW_VERSION__ = "${version}";
|
||||
const __IS_SIGNED__ = ${sign};
|
||||
|
||||
${postReleaseFile}`;
|
||||
|
||||
eval(postReleaseScript);
|
||||
}
|
||||
});
|
||||
|
||||
program
|
||||
|
||||
Reference in New Issue
Block a user