Merge lp:~tomasgroth/openlp/appveyor2 into lp:openlp

Proposed by Tomas Groth
Status: Merged
Merged at revision: 2712
Proposed branch: lp:~tomasgroth/openlp/appveyor2
Merge into: lp:openlp
Diff against target: 107 lines (+29/-12)
2 files modified
scripts/appveyor-webhook.py (+7/-3)
scripts/appveyor.yml (+22/-9)
To merge this branch: bzr merge lp:~tomasgroth/openlp/appveyor2
Reviewer Review Type Date Requested Status
Raoul Snyman Approve
Tim Bentley Approve
Review via email: mp+313502@code.launchpad.net

Description of the change

Update to the appveyor integration script to work with the new packaging builder.

To post a comment you must log in.
Revision history for this message
Tomas Groth (tomasgroth) wrote :
Revision history for this message
Tim Bentley (trb143) :
review: Approve
Revision history for this message
Raoul Snyman (raoul-snyman) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/appveyor-webhook.py'
2--- scripts/appveyor-webhook.py 2016-11-30 20:54:06 +0000
3+++ scripts/appveyor-webhook.py 2016-12-18 13:34:11 +0000
4@@ -42,7 +42,7 @@
5 {
6 'commit': {
7 'author': {
8- 'email': 'open@contributer',
9+ 'email': 'contributer@openlp',
10 'name': 'OpenLP Contributor'
11 },
12 'id': None,
13@@ -92,6 +92,10 @@
14 yml_text = f.read()
15 f.close()
16 yml_text = yml_text.replace('BRANCHNAME', branch)
17+ if 'openlp-core/openlp/trunk' in branch:
18+ yml_text = yml_text.replace('BUILD_DOCS', '$TRUE')
19+ else:
20+ yml_text = yml_text.replace('BUILD_DOCS', '$FALSE')
21 return yml_text
22
23
24@@ -115,8 +119,6 @@
25 """
26 Get the url of the build.
27 """
28- # Wait 10 seconds to make sure the hook has been triggered
29- time.sleep(10)
30 responce = urllib.request.urlopen(appveyor_api_url)
31 json_str = responce.read().decode('utf-8')
32 build_json = json.loads(json_str)
33@@ -130,4 +132,6 @@
34 webhook_url = sys.argv[1]
35 branch = sys.argv[2]
36 hook(webhook_url, get_yml(branch))
37+ # Wait 5 seconds to make sure the hook has been triggered
38+ time.sleep(5)
39 get_appveyor_build_url(branch)
40
41=== modified file 'scripts/appveyor.yml'
42--- scripts/appveyor.yml 2016-12-01 08:10:51 +0000
43+++ scripts/appveyor.yml 2016-12-18 13:34:11 +0000
44@@ -3,7 +3,6 @@
45 init:
46 - choco install -y --force bzr
47 - set PATH=C:\Program Files (x86)\Bazaar;%PATH%
48- - bzr --version
49
50 clone_script:
51 - bzr checkout --lightweight BRANCHNAME openlp-branch
52@@ -32,11 +31,11 @@
53 - 7z x -oMediaInfo MediaInfo_CLI_0.7.90_Windows_i386.zip
54 - cp MediaInfo\\MediaInfo.exe openlp-branch\\MediaInfo.exe
55
56-
57 build: off
58
59 test_script:
60 - cd openlp-branch
61+ # Run the tests
62 - "%PYTHON%\\python.exe -m nose -v tests"
63 # Go back to the user root folder
64 - cd..
65@@ -44,10 +43,10 @@
66 after_test:
67 # This is where we create a package using PyInstaller
68 # First get PyInstaller
69- - curl -L -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip
70- - 7z x develop.zip
71+ - curl -L -O https://github.com/pyinstaller/pyinstaller/releases/download/v3.2/PyInstaller-3.2.zip
72+ - 7z x PyInstaller-3.2.zip
73 # Install PyInstaller dependencies
74- - "%PYTHON%\\python.exe -m pip install future"
75+ - "%PYTHON%\\python.exe -m pip install future pefile"
76 # Download and install Inno Setup - used for packaging
77 - curl -L -O http://www.jrsoftware.org/download.php/is-unicode.exe
78 - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP-
79@@ -62,10 +61,24 @@
80 # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe
81 # - NSISPortable_3.0_English.paf.exe /S
82 # Get the packaging code
83- - bzr checkout --lightweight lp:openlp/packaging packaging
84- # Build the bundle
85- - cd packaging
86- - "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp-branch"
87+ - curl -L http://bazaar.launchpad.net/~openlp-core/openlp/packaging/tarball -o packaging.tar.gz
88+ - 7z e packaging.tar.gz
89+ - 7z x packaging.tar
90+ - mv ~openlp-core/openlp/packaging packaging
91+ # If this is trunk we should also build the manual
92+ - ps: >-
93+ If (BUILD_DOCS) {
94+ &"$env:PYTHON\python.exe" -m pip install sphinx
95+ Invoke-WebRequest -Uri "http://bazaar.launchpad.net/~openlp-core/openlp/documentation/tarball" -OutFile documentation.tar.gz
96+ 7z e documentation.tar.gz
97+ 7z x documentation.tar
98+ mv ~openlp-core/openlp/documentation documentation
99+ cd packaging
100+ &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation --portable
101+ } else {
102+ cd packaging
103+ &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch --portable
104+ }
105
106 artifacts:
107 - path: openlp-branch\dist\*.exe