@crazyfactory/gitflow
Advanced tools
Comparing version 1.9.0 to 1.10.0
12
index.js
@@ -150,2 +150,14 @@ #!/usr/bin/env node | ||
program | ||
.command('soft-push') | ||
.description('Perform soft push to trigger CI build') | ||
.action(async () => { | ||
try { | ||
await git.bailIfNotGitDirectory(); | ||
await git.softPush(); | ||
} catch (e) { | ||
console.log(e.message); | ||
} | ||
}); | ||
program.on('command:*', async (args) => { | ||
@@ -152,0 +164,0 @@ const alias = args.shift(); |
@@ -245,2 +245,8 @@ const Configstore = require('configstore'); | ||
async function softPush() { | ||
await exec('git commit --allow-empty -m "chore(ci): trigger build"'); | ||
await exec('git push origin HEAD'); | ||
} | ||
async function startFeature(config, featureBranch) { | ||
@@ -329,2 +335,3 @@ await doStash(); | ||
setConfig, | ||
softPush, | ||
startFeature, | ||
@@ -331,0 +338,0 @@ startHotfix, |
@@ -26,3 +26,3 @@ { | ||
}, | ||
"version": "1.9.0" | ||
"version": "1.10.0" | ||
} |
@@ -10,2 +10,5 @@ # Gitflow | ||
### `$ gitflow alias <name> <cmd>` | ||
Set `<cmd>` as an alias of `<name>` which you can run as `gitflow <name>` | ||
### `$ gitflow set-config` | ||
@@ -55,1 +58,4 @@ Set `project_name` and `sprint_number` for current path | ||
- Switch local branch to `origin/master` | ||
### `$ gitflow soft-push` | ||
- Create an empty commit and push it |
25299
707
60