Closed pixelzoom closed 10 months ago
The README task is the last thing that's done in createSim.js
await execute( gruntCommand, [ 'unpublished-README' ], `../${repo}` );
};
I'm guessing the problem was introduced on 6/20/22 (!) in https://github.com/phetsims/chipper/commit/6325d0dfe256cf16dec2f5a8424dce436ad5b6e0 for https://github.com/phetsims/chipper/issues/1256, where @jessegreenberg made this change in generateREADME.js:
- grunt.file.write( `../${repo}/README.md`, fixEOL( readme ) );
+ await writeFileAndGitAdd( repo, 'README.md', fixEOL( readme ) );
Since the new repo has not yet been initialized in ones working copy, writeFileAndGitAdd
will fail. Maybe we need an option to generateREADME that tells it not to do the git add
.
Assigning to @jessegreenberg.
Thanks for reporting, I confirmed the problem and will take a look.
Instead of an option, I went with a check to see if the git repo is initialized. If not, the git add
is skipped. Then I tested the create-sim task.
@pixelzoom would you like to confirm or review?
Nice solution! Thanks @jessegreenberg. Closing.
I'm following the steps to create a new sim repo in https://github.com/phetsims/phet-info/blob/main/checklists/new-repo-checklist.md.
grunt create-sim
fails in the "unpublished-README" task. Here's an example: