feat(cli): find root dir
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { join } from 'path';
|
||||
import { exec } from 'shelljs';
|
||||
import { ROOT } from '../common/constant';
|
||||
|
||||
export function changelog(dist: string, cmd: { tag?: string }) {
|
||||
const basepath = process.cwd();
|
||||
const tag = cmd.tag || 'v1.0.0';
|
||||
|
||||
exec(`
|
||||
basepath=${basepath}
|
||||
basepath=${ROOT}
|
||||
|
||||
github_changelog_generator \
|
||||
--header-label "# 更新日志" \
|
||||
@@ -18,6 +18,6 @@ export function changelog(dist: string, cmd: { tag?: string }) {
|
||||
--no-author \
|
||||
--no-unreleased \
|
||||
--since-tag ${tag} \
|
||||
-o ${join(basepath, dist)}
|
||||
-o ${join(ROOT, dist)}
|
||||
`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user