mirror of
https://github.com/barkstone2/vault-to-blog.git
synced 2026-07-22 05:21:19 +00:00
fix: Stage data.json after copying
This commit is contained in:
parent
40d4aa63a4
commit
9840b5ea8a
2 changed files with 11 additions and 0 deletions
|
|
@ -182,6 +182,7 @@ export class VTBPublishManager extends Modal {
|
|||
await this.fileUtils.copyTypesJson(this.noticeDuration);
|
||||
await this.fileUtils.copyDataJson(this.noticeDuration);
|
||||
await this.gitUtils.stageTypesJson(this.options);
|
||||
await this.gitUtils.stageDataJson(this.options);
|
||||
}
|
||||
|
||||
private reloadPublishTree = async () => {
|
||||
|
|
|
|||
|
|
@ -185,4 +185,14 @@ export class GitUtils {
|
|||
console.error(message)
|
||||
}
|
||||
}
|
||||
|
||||
async stageDataJson(options: { cwd: string }) {
|
||||
try {
|
||||
await git.cwd(options.cwd);
|
||||
await git.add(this.paths.dataJsonDestPath());
|
||||
} catch (error) {
|
||||
const message = `Failed to stage data.json.\n${error.message}`;
|
||||
console.error(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue