Skip to content

Commit

Permalink
lint cleanup for shfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ira Abramov committed Nov 7, 2024
2 parents 9bd205f + 52a1459 commit 2279401
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
8 changes: 3 additions & 5 deletions aliases/available/git.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ alias gblr='git branch --list --remotes'
alias gbm='git branch --move'
alias gbr='git branch --remotes'
alias gbt='git branch --track'
alias gdel='git branch -D'

# for-each-ref
alias gbc='git for-each-ref --format="%(authorname) %09 %(if)%(HEAD)%(then)*%(else)%(refname:short)%(end) %09 %(creatordate)" refs/remotes/ --sort=authorname DESC' # FROM https://stackoverflow.com/a/58623139/10362396
Expand Down Expand Up @@ -146,10 +145,9 @@ alias grmc='git rm --cached' # Removes the file only from the Git repository, bu
alias grb='git rebase'
alias grba='git rebase --abort'
alias grbc='git rebase --continue'
alias grbi='git rebase --interactive'
alias grm='git rebase $(get_default_branch)'
alias grmi='git rebase $(get_default_branch) -i'
alias grma='GIT_SEQUENCE_EDITOR=: git rebase $(get_default_branch) -i --autosquash'
alias grbm='git rebase $(get_default_branch)'
alias grbmi='git rebase $(get_default_branch) --interactive'
alias grbma='GIT_SEQUENCE_EDITOR=: git rebase $(get_default_branch) --interactive --autosquash'
alias gprom='git fetch origin $(get_default_branch) && git rebase origin/$(get_default_branch) && git update-ref refs/heads/$(get_default_branch) origin/$(get_default_branch)' # Rebase with latest remote

# reset
Expand Down
1 change: 1 addition & 0 deletions clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,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
26 changes: 20 additions & 6 deletions plugins/available/jgitflow.plugin.bash
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
# shellcheck shell=bash
# shellcheck disable=SC2086
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'

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'

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'

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'

mvn jgitflow:feature-finish ${JGITFLOW_MVN_ARGUMENTS}
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'
Expand All @@ -36,12 +50,12 @@ function release-start {
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'

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
}

0 comments on commit 2279401

Please sign in to comment.