Skip to content

Commit

Permalink
Support nested release branches (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
dobladov authored Oct 8, 2020
1 parent 7316b76 commit b322cd9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)

## [1.5.0] - 07.10.2020

### Added
- Support nested release branches

## [1.4.0] - 15.09.2020

### Added
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10161,7 +10161,7 @@ const run = async () => {
} = validateChangelog(changelogContent);

// Checks if the branch is release or once of release_branches input.
if (releaseBranches.includes(branch)) {
if (releaseBranches.find((releaseBranch) => branch.startsWith(releaseBranch))) {
if (isUnreleased) {
throw new Error(`"${branch}" branch can't be unreleased`);
}
Expand Down Expand Up @@ -10190,7 +10190,7 @@ const run = async () => {

// Validate if branch contains breaking changes
// and version has the same major version as previous.
if (branch === 'release') {
if (branch.startsWith('release')) {
const text = skeleton.versionText[version].map((v) => v.value).join();
const previousVersion = skeleton.versions[1];
if (
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const run = async () => {
} = validateChangelog(changelogContent);

// Checks if the branch is release or once of release_branches input.
if (releaseBranches.includes(branch)) {
if (releaseBranches.find((releaseBranch) => branch.startsWith(releaseBranch))) {
if (isUnreleased) {
throw new Error(`"${branch}" branch can't be unreleased`);
}
Expand Down Expand Up @@ -90,7 +90,7 @@ const run = async () => {

// Validate if branch contains breaking changes
// and version has the same major version as previous.
if (branch === 'release') {
if (branch.startsWith('release')) {
const text = skeleton.versionText[version].map((v) => v.value).join();
const previousVersion = skeleton.versions[1];
if (
Expand Down

0 comments on commit b322cd9

Please sign in to comment.