mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Changes to the build process to accomodate my current circumstances
This commit is contained in:
parent
983a3a76c5
commit
a099448d6a
@ -225,7 +225,10 @@ except:
|
|||||||
try:
|
try:
|
||||||
HOST=get_ip_address('wlan0')
|
HOST=get_ip_address('wlan0')
|
||||||
except:
|
except:
|
||||||
HOST='192.168.1.2'
|
try:
|
||||||
|
HOST=get_ip_address('ppp0')
|
||||||
|
except:
|
||||||
|
HOST='192.168.1.2'
|
||||||
|
|
||||||
PROJECT=os.path.basename(os.path.abspath('.'))
|
PROJECT=os.path.basename(os.path.abspath('.'))
|
||||||
|
|
||||||
|
@ -20,17 +20,23 @@ for x in [
|
|||||||
EXCLUDES.extend(['--exclude', x])
|
EXCLUDES.extend(['--exclude', x])
|
||||||
SAFE_EXCLUDES = ['"%s"'%x if '*' in x else x for x in EXCLUDES]
|
SAFE_EXCLUDES = ['"%s"'%x if '*' in x else x for x in EXCLUDES]
|
||||||
|
|
||||||
|
def get_rsync_pw():
|
||||||
|
return open('/home/kovid/work/kde/conf/buildbot').read().partition(
|
||||||
|
':')[-1].strip()
|
||||||
|
|
||||||
class Rsync(Command):
|
class Rsync(Command):
|
||||||
|
|
||||||
description = 'Sync source tree from development machine'
|
description = 'Sync source tree from development machine'
|
||||||
|
|
||||||
SYNC_CMD = ' '.join(BASE_RSYNC+SAFE_EXCLUDES+
|
SYNC_CMD = ' '.join(BASE_RSYNC+SAFE_EXCLUDES+
|
||||||
['rsync://{host}/work/{project}', '..'])
|
['rsync://buildbot@{host}/work/{project}', '..'])
|
||||||
|
|
||||||
def run(self, opts):
|
def run(self, opts):
|
||||||
cmd = self.SYNC_CMD.format(host=HOST, project=PROJECT)
|
cmd = self.SYNC_CMD.format(host=HOST, project=PROJECT)
|
||||||
|
env = dict(os.environ)
|
||||||
|
env['RSYNC_PASSWORD'] = get_rsync_pw()
|
||||||
self.info(cmd)
|
self.info(cmd)
|
||||||
subprocess.check_call(cmd, shell=True)
|
subprocess.check_call(cmd, shell=True, env=env)
|
||||||
|
|
||||||
|
|
||||||
class Push(Command):
|
class Push(Command):
|
||||||
@ -81,7 +87,8 @@ class VMInstaller(Command):
|
|||||||
|
|
||||||
|
|
||||||
def get_build_script(self):
|
def get_build_script(self):
|
||||||
ans = '\n'.join(self.BUILD_PREFIX)+'\n\n'
|
rs = ['export RSYNC_PASSWORD=%s'%get_rsync_pw()]
|
||||||
|
ans = '\n'.join(self.BUILD_PREFIX + rs)+'\n\n'
|
||||||
ans += ' && \\\n'.join(self.BUILD_RSYNC) + ' && \\\n'
|
ans += ' && \\\n'.join(self.BUILD_RSYNC) + ' && \\\n'
|
||||||
ans += ' && \\\n'.join(self.BUILD_CLEAN) + ' && \\\n'
|
ans += ' && \\\n'.join(self.BUILD_CLEAN) + ' && \\\n'
|
||||||
ans += ' && \\\n'.join(self.BUILD_BUILD) + ' && \\\n'
|
ans += ' && \\\n'.join(self.BUILD_BUILD) + ' && \\\n'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user