1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:09:44 +00:00

return err if need update

This commit is contained in:
deadc0de6
2020-12-12 15:31:25 +01:00
parent c021e0cd0a
commit 636c1ade26

View File

@@ -106,7 +106,7 @@ need_update_stable()
# get short tag if on a lightweight tag
tag=$(echo "$cur" | sed 's/\(v.*\)-[0-9]*.-.*$/\1/g')
if [ "${tag}" != "${last}" ]; then
echo "new stable version available: ${last}" && return
echo "new stable version available: ${last}" && exit 1
fi
echo "your version is up-to-date"
}
@@ -119,7 +119,7 @@ need_update()
# compare
changes=$(git log HEAD..origin --oneline)
[ "${changes}" != "" ] && echo "new updates available" && return
[ "${changes}" != "" ] && echo "new updates available" && exit 1
echo "your version is up-to-date"
}