Should I deploy today? Use it in your CI/CD environment or simply for fun.
Statements | Branches | Functions | Lines |
---|---|---|---|
- Install the library in your project as a devDependency:
npm i -D should-i-deploy-today
- Simply run it from the CLI as follows to see whether you should or should not deploy today:
npm run should-i-deploy-today
- Want it to throw an error on your CI/CD environment? Use --ci argument:
npm run should-i-deploy-today --ci
- You may also use CI=true instead:
CI=true npm run should-i-deploy-today --ci
Output example from a pipeline run on Sunday:
You should not deploy. I see you deployed on Friday
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! should-i-deploy-today@1.0.0 start: `npm run shouldIDeploy`
npm ERR! Exit status 1
- Want it without logging? Try silent mode with --silent argument (note this only works alongside CI option):
npm run should-i-deploy-today --ci --silent
Output example with --silent option (only throws without logging the message):
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! should-i-deploy-today@1.0.0 start: `npm run shouldIDeploy`
npm ERR! Exit status 1
should-i-deploy-today is MIT licensed.