mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 00:19:15 +00:00
fix check
This commit is contained in:
@@ -55,10 +55,17 @@ need_update()
|
|||||||
last=$(get_latest)
|
last=$(get_latest)
|
||||||
cur=$(get_current_tag)
|
cur=$(get_current_tag)
|
||||||
# get short tag if on a lightweight tag
|
# get short tag if on a lightweight tag
|
||||||
echo "you are on ${cur}"
|
|
||||||
tag=$(echo "$cur" | sed 's/\(v.*\)-.-.*$/\1/g')
|
tag=$(echo "$cur" | sed 's/\(v.*\)-[0-9]*.-.*$/\1/g')
|
||||||
#nb=$(echo "$cur" | sed 's/v.*-\(.\)-.*$/\1/g')
|
nb=$(echo "$cur" | sed 's/v.*-\([0-9]*\)-.*$/\1/g')
|
||||||
#commit=$(echo "$cur" | sed 's/v.*-.-\(.*\)$/\1/g')
|
commit=$(echo "$cur" | sed 's/v.*-[0-9]*-\(.*\)$/\1/g')
|
||||||
|
|
||||||
|
if [ "${commit}" != "" ]; then
|
||||||
|
echo "you are on ${tag} commit ${commit}"
|
||||||
|
else
|
||||||
|
echo "you are on ${cur}"
|
||||||
|
fi
|
||||||
|
|
||||||
# compare
|
# compare
|
||||||
if [ "${tag}" != "${last}" ]; then
|
if [ "${tag}" != "${last}" ]; then
|
||||||
echo "new version available: ${last}" && return
|
echo "new version available: ${last}" && return
|
||||||
|
|||||||
Reference in New Issue
Block a user