mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +00:00
Update semver behaviour
This commit is contained in:
parent
8bd566d4d8
commit
4bc009d845
@ -1,10 +1,19 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Get the branch name, removing any "/" characters from pull requests
|
# Get the current branch name
|
||||||
BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null | tr -d "/")
|
BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null)
|
||||||
|
|
||||||
|
# Complain if the git history is not available
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
printf "unknown"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove "/" characters from the branch name if present
|
||||||
|
BRANCH=$(echo $BRANCH | tr -d "/")
|
||||||
|
|
||||||
# Check if the branch name is not master
|
# Check if the branch name is not master
|
||||||
if [ "$BRANCH" = "master" ] || [ $? != 0 ]; then
|
if [ "$BRANCH" = "master" ]; then
|
||||||
printf "yggdrasil"
|
printf "yggdrasil"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -16,6 +16,7 @@ PATCH=$(git rev-list $TAG..master --count --merges --grep="from $DEVELOPBRANCH"
|
|||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
PATCH=$(git rev-list HEAD --count 2>/dev/null)
|
PATCH=$(git rev-list HEAD --count 2>/dev/null)
|
||||||
|
|
||||||
|
# Complain if the git history is not available
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
printf 'unknown'
|
printf 'unknown'
|
||||||
exit -1
|
exit -1
|
||||||
|
Loading…
Reference in New Issue
Block a user