branch-deploy
Advanced tools
Comparing version 1.1.1 to 1.1.2
35
index.js
@@ -74,22 +74,6 @@ import chalk from 'chalk' | ||
const deployBranches = remoteBranches.filter( | ||
(branch) => | ||
branch === branchNamePrefix || branch.startsWith(`${branchNamePrefix}/`), | ||
) | ||
if (deployBranches.length === 0) { | ||
console.error( | ||
chalk.red( | ||
`Not a single deploy branch found in remote ${chalk.magenta( | ||
remoteName, | ||
)} starting with ${chalk.magenta(branchNamePrefix)}.`, | ||
), | ||
) | ||
exit(1) | ||
} | ||
const targetBranches = await (async () => { | ||
if (targetPattern) { | ||
const patternParts = targetPattern.split('/') | ||
return deployBranches.filter((branch) => { | ||
return remoteBranches.filter((branch) => { | ||
const branchParts = branch.split('/') | ||
@@ -105,2 +89,19 @@ if (branchParts.length !== patternParts.length) { | ||
} | ||
const deployBranches = remoteBranches.filter( | ||
(branch) => | ||
branch === branchNamePrefix || branch.startsWith(`${branchNamePrefix}/`), | ||
) | ||
if (deployBranches.length === 0) { | ||
console.error( | ||
chalk.red( | ||
`Not a single deploy branch found in remote ${chalk.magenta( | ||
remoteName, | ||
)} starting with ${chalk.magenta(branchNamePrefix)}.`, | ||
), | ||
) | ||
exit(1) | ||
} | ||
if (deployBranches.length === 1) { | ||
@@ -107,0 +108,0 @@ // @TODO: ask for confirmation |
{ | ||
"name": "branch-deploy", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Deploy by pushing to a deploy* branch made simplier.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5462