Skip to content

Commit

Permalink
Merge pull request #300 from montehurd/build-codex-when-needed
Browse files Browse the repository at this point in the history
Only build Codex when needed
  • Loading branch information
montehurd committed May 8, 2024
2 parents 9fd93f0 + d440723 commit 6f5032d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/MwCheckout.js
Expand Up @@ -63,8 +63,9 @@ class MwCheckout {
* `origin/main`, respectively.
* @param {string[]} changeIds An array of Gerrit Change-Ids
* @param {Object.<string, string>} repoBranches
* @param {string} group
*/
async checkout( branch, changeIds, repoBranches = {} ) {
async checkout( branch, changeIds, repoBranches = {}, group = '' ) {
if ( branch === 'master' || branch === 'main' ) {
branch = `origin/${branch}`;
}
Expand Down Expand Up @@ -93,8 +94,7 @@ class MwCheckout {

await this.#updateSubmodules( path );
await this.#updateComposer( path );

if ( repoId === 'design/codex' ) {
if ( group === 'codex' && repoId === 'design/codex' ) {
// Build the Codex sandbox and its dependencies
await this.#simpleSpawn.spawn(
`
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Expand Up @@ -16,7 +16,7 @@ async function init() {
benchmark( async () => {
const simpleSpawn = new SimpleSpawn();
const mwCheckout = new MwCheckout( repos, simpleSpawn );
await mwCheckout.checkout( opts.branch, opts.changeId ?? [], repoBranches );
await mwCheckout.checkout( opts.branch, opts.changeId ?? [], repoBranches, opts.group );
} );
}

Expand Down

0 comments on commit 6f5032d

Please sign in to comment.