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
=== modified file 'scripts/appveyor-webhook.py'
--- scripts/appveyor-webhook.py 2016-11-30 20:54:06 +0000
+++ scripts/appveyor-webhook.py 2016-12-18 13:34:11 +0000
@@ -42,7 +42,7 @@
42 {42 {
43 'commit': {43 'commit': {
44 'author': {44 'author': {
45 'email': 'open@contributer',45 'email': 'contributer@openlp',
46 'name': 'OpenLP Contributor'46 'name': 'OpenLP Contributor'
47 },47 },
48 'id': None,48 'id': None,
@@ -92,6 +92,10 @@
92 yml_text = f.read()92 yml_text = f.read()
93 f.close()93 f.close()
94 yml_text = yml_text.replace('BRANCHNAME', branch)94 yml_text = yml_text.replace('BRANCHNAME', branch)
95 if 'openlp-core/openlp/trunk' in branch:
96 yml_text = yml_text.replace('BUILD_DOCS', '$TRUE')
97 else:
98 yml_text = yml_text.replace('BUILD_DOCS', '$FALSE')
95 return yml_text99 return yml_text
96100
97101
@@ -115,8 +119,6 @@
115 """119 """
116 Get the url of the build.120 Get the url of the build.
117 """121 """
118 # Wait 10 seconds to make sure the hook has been triggered
119 time.sleep(10)
120 responce = urllib.request.urlopen(appveyor_api_url)122 responce = urllib.request.urlopen(appveyor_api_url)
121 json_str = responce.read().decode('utf-8')123 json_str = responce.read().decode('utf-8')
122 build_json = json.loads(json_str)124 build_json = json.loads(json_str)
@@ -130,4 +132,6 @@
130 webhook_url = sys.argv[1]132 webhook_url = sys.argv[1]
131 branch = sys.argv[2]133 branch = sys.argv[2]
132 hook(webhook_url, get_yml(branch))134 hook(webhook_url, get_yml(branch))
135 # Wait 5 seconds to make sure the hook has been triggered
136 time.sleep(5)
133 get_appveyor_build_url(branch)137 get_appveyor_build_url(branch)
134138
=== modified file 'scripts/appveyor.yml'
--- scripts/appveyor.yml 2016-12-01 08:10:51 +0000
+++ scripts/appveyor.yml 2016-12-18 13:34:11 +0000
@@ -3,7 +3,6 @@
3init:3init:
4 - choco install -y --force bzr4 - choco install -y --force bzr
5 - set PATH=C:\Program Files (x86)\Bazaar;%PATH%5 - set PATH=C:\Program Files (x86)\Bazaar;%PATH%
6 - bzr --version
76
8clone_script:7clone_script:
9 - bzr checkout --lightweight BRANCHNAME openlp-branch8 - bzr checkout --lightweight BRANCHNAME openlp-branch
@@ -32,11 +31,11 @@
32 - 7z x -oMediaInfo MediaInfo_CLI_0.7.90_Windows_i386.zip31 - 7z x -oMediaInfo MediaInfo_CLI_0.7.90_Windows_i386.zip
33 - cp MediaInfo\\MediaInfo.exe openlp-branch\\MediaInfo.exe32 - cp MediaInfo\\MediaInfo.exe openlp-branch\\MediaInfo.exe
3433
35
36build: off34build: off
3735
38test_script:36test_script:
39 - cd openlp-branch37 - cd openlp-branch
38 # Run the tests
40 - "%PYTHON%\\python.exe -m nose -v tests"39 - "%PYTHON%\\python.exe -m nose -v tests"
41 # Go back to the user root folder40 # Go back to the user root folder
42 - cd..41 - cd..
@@ -44,10 +43,10 @@
44after_test:43after_test:
45 # This is where we create a package using PyInstaller44 # This is where we create a package using PyInstaller
46 # First get PyInstaller45 # First get PyInstaller
47 - curl -L -O https://github.com/pyinstaller/pyinstaller/archive/develop.zip46 - curl -L -O https://github.com/pyinstaller/pyinstaller/releases/download/v3.2/PyInstaller-3.2.zip
48 - 7z x develop.zip47 - 7z x PyInstaller-3.2.zip
49 # Install PyInstaller dependencies48 # Install PyInstaller dependencies
50 - "%PYTHON%\\python.exe -m pip install future"49 - "%PYTHON%\\python.exe -m pip install future pefile"
51 # Download and install Inno Setup - used for packaging50 # Download and install Inno Setup - used for packaging
52 - curl -L -O http://www.jrsoftware.org/download.php/is-unicode.exe51 - curl -L -O http://www.jrsoftware.org/download.php/is-unicode.exe
53 - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP-52 - is-unicode.exe /VERYSILENT /SUPPRESSMSGBOXES /SP-
@@ -62,10 +61,24 @@
62 # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe61 # - curl -L -O http://downloads.sourceforge.net/project/portableapps/NSIS%20Portable/NSISPortable_3.0_English.paf.exe
63 # - NSISPortable_3.0_English.paf.exe /S62 # - NSISPortable_3.0_English.paf.exe /S
64 # Get the packaging code63 # Get the packaging code
65 - bzr checkout --lightweight lp:openlp/packaging packaging64 - curl -L http://bazaar.launchpad.net/~openlp-core/openlp/packaging/tarball -o packaging.tar.gz
66 # Build the bundle65 - 7z e packaging.tar.gz
67 - cd packaging66 - 7z x packaging.tar
68 - "%PYTHON%\\python.exe windows/windows-builder.py -v -u -t -c windows/config-appveyor.ini -b ../openlp-branch"67 - mv ~openlp-core/openlp/packaging packaging
68 # If this is trunk we should also build the manual
69 - ps: >-
70 If (BUILD_DOCS) {
71 &"$env:PYTHON\python.exe" -m pip install sphinx
72 Invoke-WebRequest -Uri "http://bazaar.launchpad.net/~openlp-core/openlp/documentation/tarball" -OutFile documentation.tar.gz
73 7z e documentation.tar.gz
74 7z x documentation.tar
75 mv ~openlp-core/openlp/documentation documentation
76 cd packaging
77 &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch -d ../documentation --portable
78 } else {
79 cd packaging
80 &"$env:PYTHON\python.exe" builders/windows-builder.py --skip-update --skip-translations -c windows/config-appveyor.ini -b ../openlp-branch --portable
81 }
6982
70artifacts:83artifacts:
71 - path: openlp-branch\dist\*.exe84 - path: openlp-branch\dist\*.exe