balm-git-flow
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -10,5 +10,3 @@ import { getConfig } from './config.js'; | ||
async function createEmptyBranch(newBranch) { | ||
const currentBranch = await getCurrentBranch(); | ||
async function createEmptyBranch(newBranch, currentBranch) { | ||
const createCommands = [ | ||
@@ -18,7 +16,6 @@ `git checkout --orphan ${newBranch}`, | ||
`git commit --allow-empty -m "Initial commit for ${newBranch}"`, | ||
`git push origin ${newBranch}` | ||
`git push origin ${newBranch}`, | ||
`git checkout ${currentBranch}` | ||
]; | ||
await runCommands(createCommands); | ||
execCommand(`git checkout ${currentBranch}`); | ||
} | ||
@@ -29,2 +26,3 @@ | ||
if (remoteBranches) { | ||
const currentBranch = await getCurrentBranch(); | ||
const releases = getConfig('releases'); | ||
@@ -37,3 +35,3 @@ let isOK = true; | ||
logger.log(`Missing branch: '${releaseBranch}'`); | ||
await createEmptyBranch(releaseBranch); | ||
await createEmptyBranch(releaseBranch, currentBranch); | ||
} | ||
@@ -51,3 +49,3 @@ } | ||
execCommand(`git checkout -b ${newBranch} ${startPoint}`); | ||
await execCommand(`git checkout -b ${newBranch} ${startPoint}`); | ||
} |
@@ -46,3 +46,3 @@ import util from 'node:util'; | ||
} else { | ||
runCommand(awesomeCommand, cmdOptions); | ||
await runCommand(awesomeCommand, cmdOptions); | ||
} | ||
@@ -49,0 +49,0 @@ } |
@@ -49,3 +49,3 @@ import path from 'node:path'; | ||
// Clean up | ||
clean(releaseDir); | ||
await clean(releaseDir); | ||
@@ -81,3 +81,3 @@ // New worktree | ||
// Clean up | ||
clean(releaseDir); | ||
await clean(releaseDir); | ||
} | ||
@@ -84,0 +84,0 @@ |
{ | ||
"name": "balm-git-flow", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "The best practices for front-end git flow", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17396
0