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