summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorThanos Doukoudakis <thanos.doukoudakis@isode.com>2017-08-15 13:51:00 (GMT)
committerThanos Doukoudakis <thanos.doukoudakis@isode.com>2017-08-15 15:17:25 (GMT)
commit0728e9c712586c4ce06c100901f20cb0bb9e8a0e (patch)
treebb4e6e6e7576aa79ca8c9b39abdda21cd3d9d7e0 /Swift
parent2b6a7dfacc10644c1c6c79e59c953ad1537bd161 (diff)
downloadswift-0728e9c712586c4ce06c100901f20cb0bb9e8a0e.zip
swift-0728e9c712586c4ce06c100901f20cb0bb9e8a0e.tar.bz2
Force a build to stop if signing of the packages fails.
This patch will make the build attempt to sign the package 3 times. If none of the attempts are successful, the build will stop and flag the error. Test-Information: Tested packaging on Windows 10 (Qt 5.7), when the package signing succeeds (signed installer package), fails (build stops) or not required (unsigned installer package). Change-Id: Idf1f708dda50e67e54866ca598cc5160e4ea76eb
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/SConscript15
1 files changed, 13 insertions, 2 deletions
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index ff97b42..112a66e 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -57,7 +57,7 @@ myenv.Tool("textfile", toolpath = ["#/BuildTools/SCons/Tools"])
qt4modules = ['QtCore', 'QtWebKit', 'QtGui']
if myenv["qt5"] :
qt_version = '5'
- # QtSvg is required so the image format plugin for SVG images is installed
+ # QtSvg is required so the image format plugin for SVG images is installed
# correctly by Qt's deployment tools.
qt4modules += ['QtWidgets', 'QtWebKitWidgets', 'QtMultimedia', 'QtSvg']
if env["PLATFORM"] != "win32" and env["PLATFORM"] != "darwin" :
@@ -494,7 +494,18 @@ if env["PLATFORM"] == "win32" :
lightTask = myenv.WiX_Light('#/Packages/Swift/Swift-' + myenv["SWIFT_VERSION"] + '.msi', ['..\\Packaging\\WiX\\gen_files.wixobj','..\\Packaging\\WiX\\Swift.wixobj'])
if myenv.get("SIGNTOOL_KEY_PFX", None) and myenv.get("SIGNTOOL_TIMESTAMP_URL", None) :
def signToolAction(target = None, source = None, env = None):
- env.Execute('signtool.exe sign /fd SHA256 /f "${SIGNTOOL_KEY_PFX}" /t "${SIGNTOOL_TIMESTAMP_URL}" ' + str(target[0]))
+ signresult = 0
+ for x in range (1, 4) :
+ print "Attemping to sign the packages [%s]" % x
+ signresult = env.Execute('signtool.exe sign /fd SHA256 /f "${SIGNTOOL_KEY_PFX}" /t "${SIGNTOOL_TIMESTAMP_URL}" ' + str(target[0]))
+ if signresult != 1 :
+ break
+ #If all 3 attemps to sign the package failed, stop the build.
+ if signresult == 1 :
+ print "Error: The build has failed to sign the installer package"
+ Exit(1)
+ if signresult == 2 :
+ print "Signing was completed with warnings."
myenv.AddPostAction(lightTask, signToolAction)