Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: build.py

Issue 29333991: Issue 3439 - Add a build script for devbuilds (Closed)
Patch Set: Created Jan. 19, 2016, 5:17 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # coding: utf-8
3
4 import os
5 import shutil
6 import subprocess
7 import time
8
9 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
10 BUILD_DIR = os.path.join(BASE_DIR, "build")
11 BUILD_NUMBER = time.strftime("%Y%m%d%H%M", time.gmtime())
12 PACKAGE_NAME = "adblockplussafariios-%s.ipa" % BUILD_NUMBER
13
14 def build_dependencies():
15 subprocess.check_call(["pod", "install"])
16 subprocess.check_call(["xcodebuild",
17 "-workspace", "AdblockPlusSafari.xcworkspace",
18 "-scheme", "Pods-AdblockPlusSafariExtension",
19 "CONFIGURATION_BUILD_DIR=" + BUILD_DIR,
20 "build"])
21
22 def build_apps():
23 subprocess.check_call(["xcodebuild",
24 "-configuration", "Devbuild Release",
25 "CONFIGURATION_BUILD_DIR=" + BUILD_DIR,
26 "BUILD_NUMBER=" + BUILD_NUMBER,
27 "APP_PROVISIONING_PROFILE=2591efa4-c166-4956-a62a-e3a0c d41f5a3",
28 "EXTENSION_PROVISIONING_PROFILE=c4495b74-44a8-499e-ad28 -4190912bad0b",
29 "build"])
30
31 def package():
32 subprocess.check_call(["xcrun", "-sdk", "iphoneos",
33 "PackageApplication", "-v",
34 os.path.join(BUILD_DIR, "AdblockPlusSafari.app"),
35 "-o", os.path.join(BUILD_DIR, PACKAGE_NAME),
36 "-s", "iPhone Distribution: Eyeo GmbH"])
37
38 if __name__ == "__main__":
39 shutil.rmtree(BUILD_DIR, ignore_errors=True)
40 build_dependencies()
41 build_apps()
42 package()
OLDNEW
« AdblockPlusSafari.xcodeproj/project.pbxproj ('K') | « AdblockPlusSafariExtension/Info.plist ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld