branch-deploy
Advanced tools
Comparing version
17
index.js
@@ -11,3 +11,18 @@ import chalk from 'chalk' | ||
const git = simpleGit() | ||
const git = (() => { | ||
try { | ||
const git = simpleGit() | ||
return git | ||
} catch (error) { | ||
console.error( | ||
chalk.red( | ||
`Cannot communicate with git properly. Do you have git installed? Are you running this command in a git repository?`, | ||
), | ||
) | ||
if (typeof error.message === 'string') { | ||
console.error(chalk.blackBright(error.message)) | ||
} | ||
exit(1) | ||
} | ||
})() | ||
@@ -14,0 +29,0 @@ // @TODO: check current working directory is git repository |
{ | ||
"name": "branch-deploy", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Deploy by pushing a deploy* branch made simplier.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,4 +7,8 @@ # Branch deploy [](https://www.npmjs.com/package/branch-deploy) | ||
Run this command in your local git repository directory: | ||
```bash | ||
npx branch-eploy | ||
npx branch-deploy | ||
``` | ||
It will than find all branches named `deploy*` and let you choose which one to push to. It is usually useful if you have a CI that builds/deploys your project on push to that branch. |
2936
24.83%60
33.33%14
40%