diff --git a/packages/script/src/changelog.ts b/packages/script/src/changelog.ts index 3bf2999..3909507 100644 --- a/packages/script/src/changelog.ts +++ b/packages/script/src/changelog.ts @@ -1,3 +1,4 @@ +import path from 'path' import fs from 'fs-extra' import moment from 'moment' import { compareTwoStrings } from 'string-similarity' @@ -26,7 +27,7 @@ const CommitGroupBy: Array<[string, string[]]> = [ ] const getLatestVersion = () => { - return fs.readJsonSync('./config.json').version + return fs.readJsonSync(path.resolve(__dirname, './config.json')).version } const isPublishMessage = (str: string) => {