Fix and improvements to appveyor build script

This commit is contained in:
Tomas Groth 2017-05-03 20:40:30 +02:00
parent a06b41d7ac
commit a57a12441b
2 changed files with 8 additions and 7 deletions

View File

@ -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 <webhook-url> <branch>' % sys.argv[0])
if len(sys.argv) != 4:
print('Usage: %s <webhook-url> <branch> <build-docs>' % 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)

View File

@ -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