added build commit no #31
8
build.sh
8
build.sh
@ -35,7 +35,13 @@ count=$(echo ${version%%-*} | grep -o "\." | wc -l)
|
|||||||
if (( $count > 1 )); then
|
if (( $count > 1 )); then
|
||||||
version=${version%%-*}
|
version=${version%%-*}
|
||||||
else
|
else
|
||||||
version="${version%%-*}.0"
|
if [[ "$1" == "dev" ]];then
|
||||||
|
cleanprefix=${version#*-}
|
||||||
|
cleansuffix=${cleanprefix%-*}
|
||||||
|
version="${version%%-*}.${cleansuffix}"
|
||||||
|
else
|
||||||
|
version="${version%%-*}.0" # one `%` remove everything after last `-`, two `%%` remove everything after all `-`
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -f "$file_pkg" ] && [ ! -z "$version" ]; then
|
if [ -f "$file_pkg" ] && [ ! -z "$version" ]; then
|
||||||
version=" \"version\": \"$version\","
|
version=" \"version\": \"$version\","
|
||||||
|
Loading…
Reference in New Issue
Block a user