How to use the shipjs-lib.loadConfig 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 / flow / prepare.js View on Github external
firstRelease = false,
  releaseCount,
  dryRun = false,
  noBrowse = false,
  commitFrom,
}) {
  if (help) {
    printHelp();
    return;
  }
  if (dryRun) {
    printDryRunBanner();
  }
  printDeprecated({ firstRelease, releaseCount });
  checkGitHubToken({ dryRun });
  const config = loadConfig(dir);
  const { currentVersion, baseBranch } = validate({ config, dir });
  validateMergeStrategy({ config });
  const { remote } = config;
  pull({ remote, currentBranch: baseBranch, dir, dryRun });
  fetchTags({ dir, dryRun });
  push({ remote, currentBranch: baseBranch, dir, dryRun });
  const { revisionRange } = await getRevisionRange({
    yes,
    commitFrom,
    currentVersion,
    dir,
  });
  let { nextVersion } = getNextVersion({ revisionRange, currentVersion, dir });
  nextVersion = await confirmNextVersion({
    yes,
    currentVersion,
github algolia / shipjs / packages / shipjs / src / flow / release.js View on Github external
async function release({ help = false, dir = '.', dryRun = false }) {
  if (help) {
    printHelp();
    return;
  }
  if (dryRun) {
    printDryRunBanner();
  }
  checkGitHubToken({ dryRun });
  const config = loadConfig(dir);
  const { remote } = config;
  const { currentVersion: version } = validate({ config, dir });
  const {
    appName,
    latestCommitHash,
    latestCommitUrl,
    repoURL,
    releaseTag,
  } = gatherRepoInfo({ remote, version, dir });
  await notifyReleaseStart({
    config,
    appName,
    version,
    latestCommitHash,
    latestCommitUrl,
  });