diff --git a/src/layout/VTBPublishManager.ts b/src/layout/VTBPublishManager.ts index d484252..ad63931 100644 --- a/src/layout/VTBPublishManager.ts +++ b/src/layout/VTBPublishManager.ts @@ -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 () => { diff --git a/src/utils/gitUtils.ts b/src/utils/gitUtils.ts index 658705c..bb9fa3b 100644 --- a/src/utils/gitUtils.ts +++ b/src/utils/gitUtils.ts @@ -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) + } + } }