Clobber the upcoming gclient CIPD root.

Bug: 755920
Change-Id: I8f500c336168c3d92e19e3917aeaa8e78b5cf4c7
Reviewed-on: https://chromium-review.googlesource.com/977327
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: Shenghua Zhang <shenghuazhang@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#545365}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 366124fe7241d1adbc57681061517edf8f6a65a1
This commit is contained in:
John Budorick 2018-03-23 04:20:11 +00:00 коммит произвёл Commit Bot
Родитель d873086c64
Коммит fbb5a62e63
1 изменённых файлов: 33 добавлений и 0 удалений

33
cipd/clobber_cipd_root.py Executable file
Просмотреть файл

@ -0,0 +1,33 @@
#!/usr/bin/env python
#
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Clobbers a CIPD root."""
import argparse
import os
import shutil
import sys
def main():
parser = argparse.ArgumentParser(
description='Clobbers the CIPD root in the given directory.')
parser.add_argument(
'--root',
required=True,
help='Root directory for dependency.')
args = parser.parse_args()
cipd_root_dir = os.path.join(args.root, '.cipd')
if os.path.exists(cipd_root_dir):
shutil.rmtree(cipd_root_dir)
return 0
if __name__ == '__main__':
sys.exit(main())