Buck: Start buck command always from project root

After merging Buck's change 2e2550fcf54680ea4d697398d258d5ac3ba2f60c,
it is now required, that `buck` is always executed in the project root
directory.  Adjust invocation of `buck` to satisfy this requirement.

Change-Id: Ic1c79ad105d814ee23842add74c2dc54548aea47
This commit is contained in:
David Ostrovsky 2014-03-23 19:42:20 -07:00
parent d5da903e47
commit a52eca343a
2 changed files with 6 additions and 1 deletions

View File

@ -18,6 +18,7 @@
from __future__ import print_function
from collections import defaultdict, deque
from os import chdir, path
import re
from shutil import copyfileobj
from subprocess import Popen, PIPE
@ -27,6 +28,8 @@ MAIN = ['//gerrit-pgm:pgm', '//gerrit-gwtui:ui_module']
def parse_graph():
graph = defaultdict(list)
while not path.isfile('.buckconfig'):
chdir('..')
p = Popen(
['buck', 'audit', 'classpath', '--dot'] + MAIN,
stdout = PIPE)

View File

@ -15,7 +15,7 @@
from __future__ import print_function
from optparse import OptionParser
from os import makedirs, path, symlink
from os import getcwd, chdir, makedirs, path, symlink
from subprocess import check_call
import sys
from util import check_output
@ -33,6 +33,8 @@ jars = set()
def link_jars(libs, directory):
makedirs(directory)
while not path.isfile('.buckconfig'):
chdir('..')
cp = check_output(['buck', 'audit', 'classpath'] + libs)
for j in cp.strip().splitlines():
if j not in jars: