Skip to content

Commit

Permalink
fix up maintenance-create-patch.ts, phetsims/chipper#1461
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph authored and samreid committed Oct 11, 2024
1 parent 3550da2 commit 18985db
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions js/grunt/tasks/maintenance-create-patch.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
// Copyright 2024, University of Colorado Boulder

/**
* Reports out on release branch statuses
* Adds a patch to the maintenance process
* @author Jonathan Olson <[email protected]>
* @author Michael Kauzmann (PhET Interactive Simulations)
*/

import assert from 'assert';
import winston from 'winston';
import Maintenance from '../../common/Maintenance';
import assertIsValidRepoName from '../../common/assertIsValidRepoName.js';
import Maintenance from '../../common/Maintenance.js';
import getOption from './util/getOption';

winston.default.transports.console.level = 'error';

// TODO: Does this belong in grunt? See https://github.com/phetsims/chipper/issues/1461
( async () => Maintenance.checkBranchStatus() )();
( async () => {

const repo = getOption( 'repo' );
assertIsValidRepoName( repo );

const message = getOption( 'message' );

assert( repo, 'Requires specifying a repo that will need to be patched with --repo={{REPO}}' );
assert( message, 'Requires specifying a message (included with commits) with --message={{MESSAGE}}' );

await Maintenance.createPatch( repo, message );
} )();

0 comments on commit 18985db

Please sign in to comment.