Skip to content

Commit

Permalink
feat: run "verifyConditions" once
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Nov 29, 2022
1 parent 6bd4612 commit 605e0d2
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions packages/core/src/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export function getInlinePluginsCreator(
const { cwd } = context
const nextReleaseMap: { [key: string]: SemanticRelease.Release[] } = {}
const lastReleaseMap: { [key: string]: SemanticRelease.LastRelease } = {}
let conditionsVerified = false

const createInlinePlugins = (pkg: Package) => {
const { plugins, dir, name } = pkg
Expand Down Expand Up @@ -67,15 +68,17 @@ export function getInlinePluginsCreator(
synchronizer.todo().find((pkg) => !pkg.status.ready),
)

if (srmOptions.combineCommits) {
await plugins.verifyConditionsGit(context)
}
if (!conditionsVerified) {
conditionsVerified = true

const res = await plugins.verifyConditions(context)
if (srmOptions.combineCommits) {
await plugins.verifyConditionsGit(context)
}

debug('verified conditions: %s', pkg.name)
await plugins.verifyConditions(context)
}

return res
debug('verified conditions: %s', pkg.name)
}

/**
Expand Down

0 comments on commit 605e0d2

Please sign in to comment.