Skip to content

Commit

Permalink
ci: enforce branch only for latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed May 24, 2024
1 parent 4daa36f commit e24f301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpers/prepublishOnly.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const releaseTag = process.env.npm_config_tag ?? 'latest';
}
}

if ( config.gitEnforceBranch && releaseTag !== 'next' ) {
if ( config.gitEnforceBranch && releaseTag === 'latest' ) {
const currentBranch = await execAsync( 'git branch --show-current' );

if ( currentBranch.trim() !== config.gitEnforceBranch ) {
Expand Down

0 comments on commit e24f301

Please sign in to comment.