You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
576 B
18 lines
576 B
import os
|
|
import subprocess
|
|
with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "common", "version.h")) as _versionf:
|
|
version = _versionf.read().split('"')[1]
|
|
|
|
try:
|
|
origin = subprocess.check_output(["git", "config", "--get", "remote.origin.url"])
|
|
if "-private" in origin:
|
|
upstream = "origin/master"
|
|
else:
|
|
if 'chffrplus' in origin:
|
|
upstream = "origin/release"
|
|
else:
|
|
upstream = "origin/release2"
|
|
|
|
dirty = subprocess.call(["git", "diff-index", "--quiet", upstream, "--"]) != 0
|
|
except subprocess.CalledProcessError:
|
|
dirty = True
|
|
|