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 committed Oct 10, 2024
1 parent e9bc43c commit e8e0003
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 <jonathan.olson@colorado.edu>
* @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 e8e0003

Please sign in to comment.