1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

Changing repo status checking strategy

This commit is contained in:
ksamuel 2020-08-31 16:13:57 +02:00
parent 4ab4bffc0f
commit 5dcb0d407e

View File

@ -90,7 +90,7 @@ def task_bump_version():
if git("branch", "--show-current") != "master":
sys.exit("You must be on the branch master to do that")
if git("fetch", "origin", "master", "--dry-run"):
if git("git", "rev-list", "HEAD...origin/master", "--count") != "0":
sys.exit("Cannot push a new version, you need to pull first")
git_status = git("status", "--porcelain=1").split("\n")