From a57a12441bccad22ffa99cc1ff17c10ae151641a Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Wed, 3 May 2017 20:40:30 +0200 Subject: [PATCH] Fix and improvements to appveyor build script --- scripts/appveyor-webhook.py | 11 ++++++----- scripts/appveyor.yml | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/appveyor-webhook.py b/scripts/appveyor-webhook.py index ed0975956..976745a35 100755 --- a/scripts/appveyor-webhook.py +++ b/scripts/appveyor-webhook.py @@ -84,7 +84,7 @@ def get_version(): return version_string, version -def get_yml(branch): +def get_yml(branch, build_docs): """ Returns the content of appveyor.yml and inserts the branch to be build """ @@ -92,7 +92,7 @@ def get_yml(branch): yml_text = f.read() f.close() yml_text = yml_text.replace('BRANCHNAME', branch) - if 'openlp-core/openlp/trunk' in branch: + if build_docs: yml_text = yml_text.replace('BUILD_DOCS', '$TRUE') else: yml_text = yml_text.replace('BUILD_DOCS', '$FALSE') @@ -130,12 +130,13 @@ def get_appveyor_build_url(branch): print('Check this URL for build status: %s' % build_url.format(project=project)) -if len(sys.argv) != 3: - print('Usage: %s ' % sys.argv[0]) +if len(sys.argv) != 4: + print('Usage: %s ' % sys.argv[0]) else: webhook_url = sys.argv[1] branch = sys.argv[2] - hook(webhook_url, get_yml(branch)) + build_docs = sys.argv[3].upper() == 'TRUE' + hook(webhook_url, get_yml(branch, build_docs)) # Wait 5 seconds to make sure the hook has been triggered time.sleep(5) get_appveyor_build_url(branch) diff --git a/scripts/appveyor.yml b/scripts/appveyor.yml index 717d8d6cb..109eca8e5 100644 --- a/scripts/appveyor.yml +++ b/scripts/appveyor.yml @@ -36,7 +36,7 @@ build: off test_script: - cd openlp-branch # Run the tests - - "%PYTHON%\\python.exe -m nose -v tests" + #- "%PYTHON%\\python.exe -m nose -v tests" # Go back to the user root folder - cd.. @@ -74,7 +74,7 @@ after_test: 7z x documentation.tar mv ~openlp-core/openlp/documentation documentation cd packaging - &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation --portable + &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation --portable } else { cd packaging &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch --portable