|
|
@ -52,21 +52,26 @@ function extra_options { |
|
|
echo "$extra" |
|
|
echo "$extra" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
############# main |
|
|
|
|
|
|
|
|
|
|
|
# check git covered |
|
|
|
|
|
REPOSITORY=$(git config --get remote.origin.url) |
|
|
|
|
|
if [[ "$?" -ne 0 ]]; then |
|
|
|
|
|
|
|
|
function assert_git_covered { |
|
|
|
|
|
REPOSITORY=$(git config --get remote.origin.url) |
|
|
|
|
|
if [[ "$?" -ne 0 ]]; then |
|
|
echo 'no remote origin defined yet, please perform: git remote add' |
|
|
echo 'no remote origin defined yet, please perform: git remote add' |
|
|
exit 1 |
|
|
exit 1 |
|
|
fi |
|
|
|
|
|
|
|
|
fi |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
# check if dirty status |
|
|
|
|
|
changed=$(git status -s | wc -l) |
|
|
|
|
|
if [[ ! $changed -eq 0 ]]; then |
|
|
|
|
|
|
|
|
function assert_git_clean { |
|
|
|
|
|
changed=$(git status -s | wc -l) |
|
|
|
|
|
if [[ ! $changed -eq 0 ]]; then |
|
|
echo "git commit required, please do so before processing further" |
|
|
echo "git commit required, please do so before processing further" |
|
|
exit 2 |
|
|
exit 2 |
|
|
fi |
|
|
|
|
|
|
|
|
fi |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
############# main |
|
|
|
|
|
|
|
|
|
|
|
assert_git_covered |
|
|
|
|
|
# assert_git_clean |
|
|
|
|
|
|
|
|
git remote update |
|
|
git remote update |
|
|
pulled_needed=$(git status -s -u no | wc -l) |
|
|
pulled_needed=$(git status -s -u no | wc -l) |
|
|
@ -113,6 +118,8 @@ if [[ $VERSION != '0.0.0' ]]; then |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
parse_options $* |
|
|
parse_options $* |
|
|
|
|
|
echo $COMMAND |
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
|
if [[ -z $COMMAND ]]; then |
|
|
if [[ -z $COMMAND ]]; then |
|
|
echo -n "Press 'M' for Major, 'm' for minor, 'p' for patch ? " |
|
|
echo -n "Press 'M' for Major, 'm' for minor, 'p' for patch ? " |
|
|
|