MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / updateOnlineEditorRepos

Function updateOnlineEditorRepos

dev/update-editor-output-repos.js:120–147  ·  view source on GitHub ↗
(tag)

Source from the content-addressed store, hash-verified

118}
119
120async 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
149updateOnlineEditorRepos(tag);

Callers 1

Calls 5

determineOutputsFunction · 0.85
generateOutputFilesFunction · 0.85
cloneBranchFunction · 0.85
clearRepoFunction · 0.85
pushFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…