tools/semver_git_tag with --no-verify
This commit is contained in:
+20
-13
@@ -52,21 +52,26 @@ function extra_options {
|
||||
echo "$extra"
|
||||
}
|
||||
|
||||
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'
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
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"
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
############# main
|
||||
|
||||
# check git covered
|
||||
REPOSITORY=$(git config --get remote.origin.url)
|
||||
if [[ "$?" -ne 0 ]]; then
|
||||
echo 'no remote origin defined yet, please perform: git remote add'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if dirty status
|
||||
changed=$(git status -s | wc -l)
|
||||
if [[ ! $changed -eq 0 ]]; then
|
||||
echo "git commit required, please do so before processing further"
|
||||
exit 2
|
||||
fi
|
||||
assert_git_covered
|
||||
# assert_git_clean
|
||||
|
||||
git remote update
|
||||
pulled_needed=$(git status -s -u no | wc -l)
|
||||
@@ -113,6 +118,8 @@ if [[ $VERSION != '0.0.0' ]]; then
|
||||
fi
|
||||
|
||||
parse_options $*
|
||||
echo $COMMAND
|
||||
exit 1
|
||||
|
||||
if [[ -z $COMMAND ]]; then
|
||||
echo -n "Press 'M' for Major, 'm' for minor, 'p' for patch ? "
|
||||
|
||||
Reference in New Issue
Block a user