mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 11:50:28 +00:00
semver: Don't return failure codes when git history is not present
This commit is contained in:
parent
ddaaa865cb
commit
d44a7faa04
@ -6,7 +6,7 @@ BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null)
|
|||||||
# Complain if the git history is not available
|
# Complain if the git history is not available
|
||||||
if [ $? != 0 ] || [ -z "$BRANCH" ]; then
|
if [ $? != 0 ] || [ -z "$BRANCH" ]; then
|
||||||
printf "yggdrasil"
|
printf "yggdrasil"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove "/" characters from the branch name if present
|
# Remove "/" characters from the branch name if present
|
||||||
|
@ -6,7 +6,7 @@ TAG=$(git describe --abbrev=0 --tags --match="v[0-9]*\.[0-9]*\.[0-9]*" 2>/dev/nu
|
|||||||
# Did getting the tag succeed?
|
# Did getting the tag succeed?
|
||||||
if [ $? != 0 ] || [ -z "$TAG" ]; then
|
if [ $? != 0 ] || [ -z "$TAG" ]; then
|
||||||
printf -- "unknown"
|
printf -- "unknown"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the current branch
|
# Get the current branch
|
||||||
@ -36,7 +36,7 @@ if [ "$BRANCH" != "master" ]; then
|
|||||||
# Did getting the count of commits since the tag succeed?
|
# Did getting the count of commits since the tag succeed?
|
||||||
if [ $? != 0 ] || [ -z "$BUILD" ]; then
|
if [ $? != 0 ] || [ -z "$BUILD" ]; then
|
||||||
printf -- "-unknown"
|
printf -- "-unknown"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Is the build greater than zero?
|
# Is the build greater than zero?
|
||||||
|
Loading…
Reference in New Issue
Block a user