Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then( token => {
const gitVersion = versionUtils.getLastTagFromGit();
const changelogVersion = versionUtils.getLastFromChangelog();
log.info( 'Checking whether there is anything to release...' );
// If the last tag is equal to version saved in changelog, we don't have new version for release.
if ( gitVersion === changelogVersion ) {
return reject( 'Before starting the release process, you should generate the changelog and then build the package.' );
}
const releaseDescription = getChangesForVersion( changelogVersion );
log.info( 'Validating the repository for the release...' );
const errors = validatePackageToRelease( {
version: changelogVersion,
changes: releaseDescription
} );
// Abort due to errors during validation.
if ( errors.length ) {
const log = logger();
log.error( 'Unexpected errors occurred:' );
errors.map( err => '* ' + err ).forEach( log.error.bind( log ) );
return reject( 'Releasing has been aborted due to errors.' );
.then( token => {
const gitVersion = versionUtils.getLastTagFromGit();
const changelogVersion = versionUtils.getLastFromChangelog();
log.info( 'Checking whether there is anything to release...' );
// If the last tag is equal to version saved in changelog, we don't have new version for release.
if ( gitVersion === changelogVersion ) {
return reject( 'Before starting the release process, you should generate the changelog.' );
}
const releaseDescription = getChangesForVersion( changelogVersion );
log.info( 'Validating the repository for the release...' );
const errors = validatePackageToRelease( {
version: changelogVersion,
changes: releaseDescription
} );
// Abort due to errors during validation.
if ( errors.length ) {
const log = logger();
log.error( 'Unexpected errors occured:' );
errors.map( err => '* ' + err ).forEach( log.error.bind( log ) );
return reject( 'Releasing has been aborted due to errors.' );
.then( token => {
const gitVersion = versionUtils.getLastTagFromGit();
const changelogVersion = versionUtils.getLastFromChangelog();
log.info( 'Checking whether there is anything to release...' );
// If the last tag is equal to version saved in changelog, we don't have new version for release.
if ( gitVersion === changelogVersion ) {
return reject( 'Before starting the release process, you should generate the changelog.' );
}
const releaseDescription = getChangesForVersion( changelogVersion );
log.info( 'Validating the repository for the release...' );
const errors = validatePackageToRelease( {
version: changelogVersion,
changes: releaseDescription
} );
// Abort due to errors during validation.
if ( errors.length ) {
const log = logger();
log.error( 'Unexpected errors occured:' );
errors.map( err => '* ' + err ).forEach( log.error.bind( log ) );
return reject( 'Releasing has been aborted due to errors.' );