git - how to make a flag in shell cli app -


i rewriting old git plugin made (git-build) has 2 commands want turn 1 command --flag

run() {   require_clean_work_tree rebase "please commit or stash them."   source git-build.sh   git add .   git commit -m 'build $version'   git tag $version }  run-deploy() {   require_clean_work_tree rebase "please commit or stash them."   source git-build.sh   git add .   git commit -m 'build $version'   git tag $version   git push -tags } 

i wish have run-deploy turn run --deploy.

unless there special magic involved git plugins that's simple as

run() {   require_clean_work_tree rebase "please commit or stash them."   source git-build.sh   git add .   git commit -m 'build $version'   [ "$1" = '--deploy' ] && git tag $version } 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -