Skip to content

Commit d91426e

Browse files
committed
fix: update cli config
1 parent c383afb commit d91426e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

lib/package/release.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export default class Publish {
8787
else if ( status.head.branch !== this.#previousReleaseBranch ) {
8888
this.#originalBranch = status.head.branch;
8989

90-
// check allowed branch
91-
if ( this.#pkg.cliConfig?.release.releaseBranches && !this.#pkg.cliConfig.release.releaseBranches.includes( this.#originalBranch ) ) {
90+
// check allowed release branches
91+
if ( this.#pkg.cliConfig?.release.releaseBranches != null && ( !this.#pkg.cliConfig.release.releaseBranches || !this.#pkg.cliConfig.release.releaseBranches.includes( this.#originalBranch ) ) ) {
9292
return result( [ 500, "Unable to create release from the current branch" ] );
9393
}
9494

resources/schemas/cli.config.schema.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ properties:
112112
releaseBranches:
113113
anyOf:
114114
- type: "null"
115+
- const: false
115116
- { type: array, items: { type: string }, minItems: 1, uniqueItems: true }
116117
majorTagEnabled: { type: boolean }
117118
additionalProperties: false

0 commit comments

Comments
 (0)