phetsims / perennial

Maintenance tools that won't change with different versions of chipper checked out
MIT License
2 stars 5 forks source link

Allow checking out `main` with Maintenance.checkoutBranch() #320

Open zepumph opened 1 year ago

zepumph commented 1 year ago

Right now you get an error because master isn't a modified branch (ever)

maintenance> m.checkoutBranch( 'my-solar-system', 'master' )
Maintenance task failed:
Error: Could not find a tracked modified branch for my-solar-system master
    at Maintenance.ensureModifiedBranch (C:\Users\mjkauzmann\PHET\git\perennial\js\common\Maintenance.js:1259:17)
    at Maintenance.checkoutBranch (C:\Users\mjkauzmann\PHET\git\perennial\js\common\Maintenance.js:681:48)
    at REPL8:2:3
    at Script.runInContext (node:vm:141:12)
    at defaultEval (node:repl:574:29)
    at bound (node:domain:433:15)
    at runBound (node:domain:444:12)
    at session.eval (C:\Users\mjkauzmann\PHET\git\perennial\js\common\Maintenance.js:1175:11)
    at REPLServer.onLine (node:repl:902:10)
    at REPLServer.emit (node:events:513:28)

@jonathanolson can we add support for not checking ensureModifiedBranch if the target branch is master?