mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +01:00
Run git command only with mach build commands
This commit is contained in:
parent
fc4fc773b4
commit
6548325bd2
2 changed files with 5 additions and 5 deletions
|
@ -348,7 +348,7 @@ class CommandBase(object):
|
|||
" --release" if release else ""))
|
||||
sys.exit()
|
||||
|
||||
def build_env(self, hosts_file_path=None, target=None):
|
||||
def build_env(self, hosts_file_path=None, target=None, is_build=False):
|
||||
"""Return an extended environment dictionary."""
|
||||
env = os.environ.copy()
|
||||
if sys.platform == "win32" and type(env['PATH']) == unicode:
|
||||
|
@ -445,7 +445,7 @@ class CommandBase(object):
|
|||
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -W unused-extern-crates"
|
||||
|
||||
git_info = []
|
||||
if os.path.isdir('.git'):
|
||||
if os.path.isdir('.git') and is_build:
|
||||
git_sha = subprocess.check_output([
|
||||
'git', 'rev-parse', '--short', 'HEAD'
|
||||
]).strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue