Updated deploy scripts.
This commit is contained in:
parent
09e3b6ad3a
commit
a2beefd77f
4 changed files with 4 additions and 64 deletions
|
@ -79,21 +79,6 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
|
|||
print('\nSigning bundle\n')
|
||||
self.signPackage(self.appBundleDir)
|
||||
|
||||
def commitHash(self):
|
||||
try:
|
||||
process = subprocess.Popen(['git', 'rev-parse', 'HEAD'], # nosec
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
cwd=self.rootDir)
|
||||
stdout, _ = process.communicate()
|
||||
|
||||
if process.returncode != 0:
|
||||
return ''
|
||||
|
||||
return stdout.decode(sys.getdefaultencoding()).strip()
|
||||
except:
|
||||
return ''
|
||||
|
||||
@staticmethod
|
||||
def sysInfo():
|
||||
process = subprocess.Popen(['sw_vers'], # nosec
|
||||
|
@ -121,7 +106,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
|
|||
# Write repository info.
|
||||
|
||||
with open(depsInfoFile, 'w') as f:
|
||||
commitHash = self.commitHash()
|
||||
commitHash = self.gitCommitHash(self.rootDir)
|
||||
|
||||
if len(commitHash) < 1:
|
||||
commitHash = 'Unknown'
|
||||
|
|
|
@ -203,21 +203,6 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
|
|||
|
||||
return ''
|
||||
|
||||
def commitHash(self):
|
||||
try:
|
||||
process = subprocess.Popen(['git', 'rev-parse', 'HEAD'], # nosec
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
cwd=self.rootDir)
|
||||
stdout, _ = process.communicate()
|
||||
|
||||
if process.returncode != 0:
|
||||
return ''
|
||||
|
||||
return stdout.decode(sys.getdefaultencoding()).strip()
|
||||
except:
|
||||
return ''
|
||||
|
||||
@staticmethod
|
||||
def sysInfo():
|
||||
info = ''
|
||||
|
@ -248,7 +233,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
|
|||
# Write repository info.
|
||||
|
||||
with open(depsInfoFile, 'w') as f:
|
||||
commitHash = self.commitHash()
|
||||
commitHash = self.gitCommitHash(self.rootDir)
|
||||
|
||||
if len(commitHash) < 1:
|
||||
commitHash = 'Unknown'
|
||||
|
|
|
@ -108,21 +108,6 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
|
|||
print('\nWritting build system information\n')
|
||||
self.writeBuildInfo()
|
||||
|
||||
def commitHash(self):
|
||||
try:
|
||||
process = subprocess.Popen(['git', 'rev-parse', 'HEAD'], # nosec
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
cwd=self.rootDir)
|
||||
stdout, _ = process.communicate()
|
||||
|
||||
if process.returncode != 0:
|
||||
return ''
|
||||
|
||||
return stdout.decode(sys.getdefaultencoding()).strip()
|
||||
except:
|
||||
return ''
|
||||
|
||||
@staticmethod
|
||||
def sysInfo():
|
||||
info = ''
|
||||
|
@ -152,7 +137,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
|
|||
# Write repository info.
|
||||
|
||||
with open(depsInfoFile, 'w') as f:
|
||||
commitHash = self.commitHash()
|
||||
commitHash = self.gitCommitHash(self.rootDir)
|
||||
|
||||
if len(commitHash) < 1:
|
||||
commitHash = 'Unknown'
|
||||
|
|
|
@ -115,21 +115,6 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
|
|||
for afile in afiles:
|
||||
os.remove(afile)
|
||||
|
||||
def commitHash(self):
|
||||
try:
|
||||
process = subprocess.Popen(['git', 'rev-parse', 'HEAD'], # nosec
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
cwd=self.rootDir)
|
||||
stdout, _ = process.communicate()
|
||||
|
||||
if process.returncode != 0:
|
||||
return ''
|
||||
|
||||
return stdout.decode(sys.getdefaultencoding()).strip()
|
||||
except:
|
||||
return ''
|
||||
|
||||
@staticmethod
|
||||
def sysInfo():
|
||||
try:
|
||||
|
@ -163,7 +148,7 @@ class Deploy(DTDeployBase.DeployBase, DTQt5.Qt5Tools):
|
|||
# Write repository info.
|
||||
|
||||
with open(depsInfoFile, 'w') as f:
|
||||
commitHash = self.commitHash()
|
||||
commitHash = self.gitCommitHash(self.rootDir)
|
||||
|
||||
if len(commitHash) < 1:
|
||||
commitHash = 'Unknown'
|
||||
|
|
Loading…
Reference in a new issue