How to use the shipjs-lib.getNextVersion function in shipjs-lib

To help you get started, we’ve selected a few shipjs-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github algolia / shipjs / packages / shipjs / src / step / prepare / getNextVersion.js View on Github external
runStep({ title: 'Calculating the next version.' }, () => {
    const { version: nextVersion, ignoredMessages = [] } = getNextVersion(
      revisionRange,
      currentVersion,
      dir
    );
    if (ignoredMessages.length > 0) {
      print(
        warning('The following commit messages out of convention are ignored:')
      );
      ignoredMessages.forEach(message => print(`  ${message}`));
    }
    if (nextVersion === null) {
      print(info('Nothing to release!'));
      exitProcess(0);
    }
    return { nextVersion };
  });