tools/semver_git_tag with --no-verify
This commit is contained in:
+20
-13
@@ -52,21 +52,26 @@ function extra_options {
|
|||||||
echo "$extra"
|
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
|
############# main
|
||||||
|
|
||||||
# check git covered
|
assert_git_covered
|
||||||
REPOSITORY=$(git config --get remote.origin.url)
|
# assert_git_clean
|
||||||
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
|
|
||||||
|
|
||||||
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 ? "
|
||||||
|
|||||||
Reference in New Issue
Block a user