Rename mach command to upgrade wptrunner and make it work more than once.

This commit is contained in:
Josh Matthews 2016-07-04 10:29:30 -04:00
parent 6bd898626f
commit 906b7b33ef

View file

@ -170,7 +170,7 @@ class MachCommands(CommandBase):
print(cargo_path)
call(["cargo", "fetch"], env=self.build_env())
@Command('wpt-upgrade',
@Command('wptrunner-upgrade',
description='upgrade wptrunner.',
category='devenv')
def upgrade_wpt_runner(self):
@ -178,6 +178,8 @@ class MachCommands(CommandBase):
code = call(["git", "init"], env=self.build_env())
if code:
return code
# No need to report an error if this fails, as it will for the first use
call(["git", "remote", "rm", "upstream"], env=self.build_env())
code = call(
["git", "remote", "add", "upstream", "https://github.com/w3c/wptrunner.git"], env=self.build_env())
if code: