Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-jgitflow function #2234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ plugins/available/history.plugin.bash
plugins/available/hub.plugin.bash
plugins/available/java.plugin.bash
plugins/available/jekyll.plugin.bash
plugins/available/jgitflow.plugin.bash
plugins/available/jump.plugin.bash
plugins/available/latex.plugin.bash
plugins/available/less-pretty-cat.plugin.bash
Expand Down
55 changes: 34 additions & 21 deletions plugins/available/jgitflow.plugin.bash
Original file line number Diff line number Diff line change
@@ -1,47 +1,60 @@
# shellcheck shell=bash
cite about-plugin
about-plugin 'Maven jgitflow build helpers'

function pre-jgitflow {
about 'helper function for execute before jgitflow'
group 'jgitflow'
}

function test-pre-jgitflow {
about 'helper function for starting a new hotfix'
group 'jgitflow'

echo "Init pre-maven" && pre-jgitflow && echo "Finish pre-maven"
}

function hotfix-start {
about 'helper function for starting a new hotfix'
group 'jgitflow'
about 'helper function for starting a new hotfix'
group 'jgitflow'

mvn jgitflow:hotfix-start ${JGITFLOW_MVN_ARGUMENTS}
pre-jgitflow && mvn jgitflow:hotfix-start ${JGITFLOW_MVN_ARGUMENTS}
}

function hotfix-finish {
about 'helper function for finishing a hotfix'
group 'jgitflow'
about 'helper function for finishing a hotfix'
group 'jgitflow'

mvn jgitflow:hotfix-finish -Darguments="${JGITFLOW_MVN_ARGUMENTS}" && git push && git push origin master && git push --tags
pre-jgitflow && mvn jgitflow:hotfix-finish -Darguments="${JGITFLOW_MVN_ARGUMENTS}" && git push && git push origin master && git push --tags && mvn clean
}

function feature-start {
about 'helper function for starting a new feature'
group 'jgitflow'
about 'helper function for starting a new feature'
group 'jgitflow'

mvn jgitflow:feature-start ${JGITFLOW_MVN_ARGUMENTS}
pre-jgitflow && mvn jgitflow:feature-start ${JGITFLOW_MVN_ARGUMENTS}
}

function feature-finish {
about 'helper function for finishing a feature'
group 'jgitflow'
about 'helper function for finishing a feature'
group 'jgitflow'

mvn jgitflow:feature-finish ${JGITFLOW_MVN_ARGUMENTS}
echo -e '\033[32m----------------------------------------------------------------\033[0m'
echo -e '\033[32m===== REMEMBER TO CREATE A NEW RELEASE TO DEPLOY THIS FEATURE ====\033[0m'
echo -e '\033[32m----------------------------------------------------------------\033[0m'
pre-jgitflow && mvn jgitflow:feature-finish ${JGITFLOW_MVN_ARGUMENTS} && mvn clean
echo -e '\033[32m----------------------------------------------------------------\033[0m'
echo -e '\033[32m===== REMEMBER TO CREATE A NEW RELEASE TO DEPLOY THIS FEATURE ====\033[0m'
echo -e '\033[32m----------------------------------------------------------------\033[0m'
}

function release-start {
about 'helper function for starting a new release'
group 'jgitflow'
about 'helper function for starting a new release'
group 'jgitflow'

mvn jgitflow:release-start ${JGITFLOW_MVN_ARGUMENTS}
pre-jgitflow && mvn jgitflow:release-start ${JGITFLOW_MVN_ARGUMENTS}
}

function release-finish {
about 'helper function for finishing a release'
group 'jgitflow'
about 'helper function for finishing a release'
group 'jgitflow'

mvn jgitflow:release-finish -Darguments="${JGITFLOW_MVN_ARGUMENTS}" && git push && git push origin master && git push --tags
pre-jgitflow && mvn jgitflow:release-finish -Darguments="${JGITFLOW_MVN_ARGUMENTS}" && git push && git push origin master && git push --tags && mvn clean
}
Loading