mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Merge branch 'master' of git://gitorious.org/f-droid/fdroidserver
This commit is contained in:
commit
c2ebb73a34
3 changed files with 13 additions and 5 deletions
1
buildserver/.gitignore
vendored
1
buildserver/.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
.vagrant
|
.vagrant
|
||||||
|
up.log
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,9 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
|
||||||
|
|
||||||
# Open SSH connection to make sure it's working and ready...
|
# Open SSH connection to make sure it's working and ready...
|
||||||
print "Connecting to virtual machine..."
|
print "Connecting to virtual machine..."
|
||||||
subprocess.call('vagrant ssh-config >sshconfig',
|
if subprocess.call('vagrant ssh-config >sshconfig',
|
||||||
cwd='builder', shell=True)
|
cwd='builder', shell=True) != 0:
|
||||||
|
raise BuildException("Error getting ssh config")
|
||||||
vagranthost = 'default' # Host in ssh config file
|
vagranthost = 'default' # Host in ssh config file
|
||||||
sshconfig = ssh.SSHConfig()
|
sshconfig = ssh.SSHConfig()
|
||||||
sshf = open('builder/sshconfig', 'r')
|
sshf = open('builder/sshconfig', 'r')
|
||||||
|
|
@ -191,7 +192,8 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
|
||||||
for lib in thisbuild['extlibs'].split(';'):
|
for lib in thisbuild['extlibs'].split(';'):
|
||||||
lp = lib.split('/')
|
lp = lib.split('/')
|
||||||
for d in lp[:-1]:
|
for d in lp[:-1]:
|
||||||
ftp.mkdir(d)
|
if d not in ftp.listdir():
|
||||||
|
ftp.mkdir(d)
|
||||||
ftp.chdir(d)
|
ftp.chdir(d)
|
||||||
ftp.put(os.path.join('build/extlib', lib), lp[-1])
|
ftp.put(os.path.join('build/extlib', lib), lp[-1])
|
||||||
for _ in lp[:-1]:
|
for _ in lp[:-1]:
|
||||||
|
|
@ -351,6 +353,10 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, extlib_dir, tmp_dir,
|
||||||
# This format is found in com.github.mobile for example...
|
# This format is found in com.github.mobile for example...
|
||||||
m = re.match(r".*^\[INFO\] [^$]*aapt \[package,[^$]*" + app['id'] + "/app/target/([^$]+)\.ap_\]",
|
m = re.match(r".*^\[INFO\] [^$]*aapt \[package,[^$]*" + app['id'] + "/app/target/([^$]+)\.ap_\]",
|
||||||
output, re.S|re.M)
|
output, re.S|re.M)
|
||||||
|
if not m:
|
||||||
|
# This format is found in com.yubico.yubitotp and com.botbrew.basil for example...
|
||||||
|
m = re.match(r".*^\[INFO\] [^$]*aapt \[package,[^$]*" + app['id'] + "/" + thisbuild['bindir'] + "/([^$]+)\.ap_,",
|
||||||
|
output, re.S|re.M)
|
||||||
if not m:
|
if not m:
|
||||||
print output
|
print output
|
||||||
raise BuildException('Failed to find output')
|
raise BuildException('Failed to find output')
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,11 @@ if os.path.exists(boxfile):
|
||||||
vagrant(['halt'], serverdir)
|
vagrant(['halt'], serverdir)
|
||||||
print "Configuring build server VM"
|
print "Configuring build server VM"
|
||||||
returncode, out, err = vagrant(['up'], serverdir)
|
returncode, out, err = vagrant(['up'], serverdir)
|
||||||
|
with open(os.path.join(serverdir, 'up.log'), 'w') as log:
|
||||||
|
log.write('==stdout==\n' + out + '\n\n')
|
||||||
|
log.write('==stderr==\n' + err + '\n\n')
|
||||||
if returncode != 0:
|
if returncode != 0:
|
||||||
print "Failed to configure server"
|
print "Failed to configure server"
|
||||||
print out
|
|
||||||
print err
|
|
||||||
print "Stopping build server VM"
|
print "Stopping build server VM"
|
||||||
vagrant(['halt'], serverdir)
|
vagrant(['halt'], serverdir)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue