regit-cli
v1.4.0
Published
git helper cli
Downloads
77
Readme
register globally
yarn link --global
unregister globally
yarn unlink --global
Publish
Update version to match with package.json in program.ts
then
npm publish
Usage with npx
npx regit-cli
init playground
mkdir local
mkdir remote
# set origin
cd local
git remote add origin [playground-remote-folder]
Doc
Init
regit init <version>
Features
regit feature start [feature-name]
regit feature list
Release
regit release start
regit release add [feature-name]
regit release status
regit release finish
Tags
regit tag list
Hooks
It is possible to add pre and post hook functions to adapt the tool to your workflow, to implement your own logic, place a file named regit.js
in the root of your project.
Hook interface:
export interface Hooks {
getFeatureName: (id: string) => Promise<string>
preFeatureStart: (id: string) => Promise<void>
postFeatureStart: (id: string) => Promise<void>
preReleaseFinish: (version: string) => Promise<void>
postReleaseFinish: (version: string) => Promise<void>
}
module.exports = {
getFeatureName: async (id) => {
return Promise.resolve('your feature name')
},
preFeatureStart: async (id) => {
console.log('do something clever BEFORE feature start')
},
postFeatureStart: async (id) => {
console.log('do something clever AFTER feature start')
},
preReleaseFinish: async (id) => {
console.log('do something clever BEFORE release finish')
},
postReleaseFinish: async (id) => {
console.log('do something clever AFTER release finish')
},
}