(tag)
| 118 | } |
| 119 | |
| 120 | async function updateOnlineEditorRepos(tag) { |
| 121 | let infos = await determineOutputs(tag); |
| 122 | |
| 123 | console.log(`Updating online editor repo :: ${infos.length} branches`); |
| 124 | |
| 125 | for (let info of infos) { |
| 126 | let generatedOutputPath = await generateOutputFiles(info); |
| 127 | |
| 128 | let tmpdir = tmp.dirSync(); |
| 129 | await fs.mkdirp(tmpdir.name); |
| 130 | |
| 131 | let outputRepoPath = await cloneBranch(tmpdir.name, info); |
| 132 | |
| 133 | await clearRepo(outputRepoPath); |
| 134 | |
| 135 | console.log('copying generated contents to output repo'); |
| 136 | await fs.copy(generatedOutputPath, outputRepoPath); |
| 137 | |
| 138 | console.log('copying online editor files'); |
| 139 | await fs.copy(path.join(ONLINE_EDITOR_FILES, info.onlineEditor), outputRepoPath); |
| 140 | |
| 141 | console.log('commiting updates'); |
| 142 | await execa('git', ['add', '--all'], { cwd: outputRepoPath }); |
| 143 | await execa('git', ['commit', '-m', info.tag], { cwd: outputRepoPath }); |
| 144 | |
| 145 | await push(outputRepoPath, info); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | updateOnlineEditorRepos(tag); |
no test coverage detected
searching dependent graphs…