openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #32926
[Merge] lp:~tomasgroth/openlp/appveyor-no-bzr into lp:openlp
Tomas Groth has proposed merging lp:~tomasgroth/openlp/appveyor-no-bzr into lp:openlp.
Commit message:
Workaround for bazaar no longer working on appveyor. We now download a tarball instead of checking out the code.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~tomasgroth/openlp/appveyor-no-bzr/+merge/352222
--
Your team OpenLP Core is requested to review the proposed merge of lp:~tomasgroth/openlp/appveyor-no-bzr into lp:openlp.
=== modified file 'scripts/appveyor-webhook.py'
--- scripts/appveyor-webhook.py 2017-12-29 09:15:48 +0000
+++ scripts/appveyor-webhook.py 2018-08-02 20:19:12 +0000
@@ -81,7 +81,7 @@
latest = output.decode('utf-8').split(':')[0]
version_string = latest == revision and tag or 'r%s' % latest
# Save decimal version in case we need to do a portable build.
- version = latest == revision and tag or '%s.%s' % (tag, latest)
+ version = latest == revision and tag or '%s-bzr%s' % (tag, latest)
return version_string, version
@@ -92,21 +92,24 @@
f = open('appveyor.yml')
yml_text = f.read()
f.close()
- yml_text = yml_text.replace('BRANCHNAME', branch)
+ version_string, version = get_version()
+ yml_text = yml_text.replace('TAG', version)
if build_type in ['openlp', 'trunk']:
+ yml_text = yml_text.replace('BRANCHPATH', '~openlp-core/openlp/trunk')
yml_text = yml_text.replace('BUILD_DOCS', '$TRUE')
else:
+ yml_text = yml_text.replace('BRANCHPATH', branch.split(':')[1])
yml_text = yml_text.replace('BUILD_DOCS', '$FALSE')
- return yml_text
-
-
-def hook(webhook_url, yml):
+ return yml_text, version_string
+
+
+def hook(webhook_url, branch, build_type):
"""
Activate the webhook to start the build
"""
+ yml, version_string = get_yml(branch, build_type)
webhook_element['config'] = yml
webhook_element['commit']['message'] = 'Building ' + branch
- version_string, version = get_version()
webhook_element['commit']['id'] = version_string
request = urllib.request.Request(webhook_url)
request.add_header('Content-Type', 'application/json;charset=utf-8')
@@ -137,7 +140,7 @@
if build_type not in ['dev', 'trunk', 'openlp']:
print('Invalid build type\nUsage: %s <webhook-url> <branch> <dev|trunk|openlp>' % sys.argv[0])
exit()
- hook(webhook_url, get_yml(branch, build_type))
+ hook(webhook_url, branch, build_type)
# Wait 5 seconds to make sure the hook has been triggered
time.sleep(5)
get_appveyor_build_url(build_type)
=== modified file 'scripts/appveyor.yml'
--- scripts/appveyor.yml 2017-09-25 19:01:54 +0000
+++ scripts/appveyor.yml 2018-08-02 20:19:12 +0000
@@ -1,18 +1,17 @@
version: OpenLP-win-ci-b{build}
-init:
- - choco install -y --force bzr
- - set PATH=C:\Program Files (x86)\Bazaar;%PATH%
-
clone_script:
- - bzr checkout --lightweight BRANCHNAME openlp-branch
+ - curl -L https://bazaar.launchpad.net/BRANCHPATH/tarball -o sourcecode.tar.gz
+ - 7z e sourcecode.tar.gz
+ - 7z x sourcecode.tar
+ - mv BRANCHPATH openlp-branch
environment:
PYTHON: C:\\Python34
install:
# Install dependencies from pypi
- - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic chardet beautifulsoup4 Mako nose mock pyodbc==4.0.8 psycopg2 pypiwin32 pyenchant websockets asyncio waitress six webob requests"
+ - "%PYTHON%\\python.exe -m pip install sqlalchemy alembic chardet beautifulsoup4 Mako nose mock pyodbc==4.0.8 psycopg2 pypiwin32==219 pyenchant websockets asyncio waitress six webob requests"
# Install mysql dependency
- "%PYTHON%\\python.exe -m pip install http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip#md5=3df394d89300db95163f17c843ef49df"
# Download and install lxml and pyicu (originally from http://www.lfd.uci.edu/~gohlke/pythonlibs/)
@@ -74,10 +73,10 @@
7z x documentation.tar
mv ~openlp-core/openlp/documentation documentation
cd packaging
- &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update -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 --tag-override TAG
} else {
cd packaging
- &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch --portable
+ &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch --portable --tag-override TAG
}
artifacts:
Follow ups