More breakage from a855e38 - this is what you get for having everything in one giant function

This commit is contained in:
Ciaran Gultnieks 2011-01-10 07:59:41 +00:00
parent 276463c242
commit 954af57bf6

View file

@ -124,12 +124,14 @@ for app in apps:
print "Invalid repo type " + app['repotype'] + " in " + app['id'] print "Invalid repo type " + app['repotype'] + " in " + app['id']
sys.exit(1) sys.exit(1)
# Optionally, the actual app source can be in a subdirectory... # Optionally, the actual app source can be in a subdirectory...
doupdate = True doupdate = True
if thisbuild.has_key('subdir'): if thisbuild.has_key('subdir'):
if app['repotype'] == 'svn' and repo.endswith("*"): if app['repotype'] == 'svn' and repo.endswith("*"):
root_dir = build_dir root_dir = build_dir
# Remove the build directory if it already exists...
if os.path.exists(build_dir):
shutil.rmtree(build_dir)
if subprocess.call(['svn', 'checkout', if subprocess.call(['svn', 'checkout',
repo[:-1] + thisbuild['subdir'], repo[:-1] + thisbuild['subdir'],
'-r', thisbuild['commit'], '-r', thisbuild['commit'],
@ -147,9 +149,9 @@ for app in apps:
if doupdate: if doupdate:
if app['repotype'] == 'git': if app['repotype'] == 'git':
if subprocess.call(['git', 'checkout', thisbuild['commit']], if subprocess.call(['git', 'reset', '--hard', thisbuild['commit']],
cwd=build_dir) != 0: cwd=build_dir) != 0:
print "Git checkout failed" print "Git reset failed"
sys.exit(1) sys.exit(1)
elif app['repotype'] == 'svn': elif app['repotype'] == 'svn':
if subprocess.call(['svn', 'update', '-r', thisbuild['commit']], if subprocess.call(['svn', 'update', '-r', thisbuild['commit']],