DEPS: Cleanup extra_gyp_flag and extra_gitignore.py
Both of these are unused legacy stuff. BUG=webrtc:6323 NOTRY=True Review-Url: https://codereview.webrtc.org/2520253002 Cr-Commit-Position: refs/heads/master@{#15183}
This commit is contained in:
parent
875862ca86
commit
d848a5686f
1
DEPS
1
DEPS
@ -4,7 +4,6 @@
|
|||||||
# instead.
|
# instead.
|
||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
'extra_gyp_flag': '-Dextra_gyp_flag=0',
|
|
||||||
'chromium_git': 'https://chromium.googlesource.com',
|
'chromium_git': 'https://chromium.googlesource.com',
|
||||||
'chromium_revision': '5e821a778b85878bafcc8128f64333fd518c79a5',
|
'chromium_revision': '5e821a778b85878bafcc8128f64333fd518c79a5',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
# Sample DEPS file for testing.
|
# Sample DEPS file for testing.
|
||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
'extra_gyp_flag': '-Dextra_gyp_flag=0',
|
|
||||||
'chromium_git': 'https://chromium.googlesource.com',
|
'chromium_git': 'https://chromium.googlesource.com',
|
||||||
'chromium_revision': '1b9c098a08e40114e44b6c1ec33ddf95c40b901d',
|
'chromium_revision': '1b9c098a08e40114e44b6c1ec33ddf95c40b901d',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,6 @@ from roll_chromium_revision import ParseDepsDict, UpdateDeps, \
|
|||||||
GetMatchingDepsEntries
|
GetMatchingDepsEntries
|
||||||
|
|
||||||
TEST_DATA_VARS = {
|
TEST_DATA_VARS = {
|
||||||
'extra_gyp_flag': '-Dextra_gyp_flag=0',
|
|
||||||
'chromium_git': 'https://chromium.googlesource.com',
|
'chromium_git': 'https://chromium.googlesource.com',
|
||||||
'chromium_revision': '1b9c098a08e40114e44b6c1ec33ddf95c40b901d',
|
'chromium_revision': '1b9c098a08e40114e44b6c1ec33ddf95c40b901d',
|
||||||
}
|
}
|
||||||
@ -61,7 +60,6 @@ class TestRollChromiumRevision(unittest.TestCase):
|
|||||||
|
|
||||||
def assertVar(variable_name):
|
def assertVar(variable_name):
|
||||||
self.assertEquals(vars_dict[variable_name], TEST_DATA_VARS[variable_name])
|
self.assertEquals(vars_dict[variable_name], TEST_DATA_VARS[variable_name])
|
||||||
assertVar('extra_gyp_flag')
|
|
||||||
assertVar('chromium_git')
|
assertVar('chromium_git')
|
||||||
assertVar('chromium_revision')
|
assertVar('chromium_revision')
|
||||||
|
|
||||||
|
|||||||
@ -1,46 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Use of this source code is governed by a BSD-style license
|
|
||||||
# that can be found in the LICENSE file in the root of the source
|
|
||||||
# tree. An additional intellectual property rights grant can be found
|
|
||||||
# in the file PATENTS. All contributing project authors may
|
|
||||||
# be found in the AUTHORS file in the root of the source tree.
|
|
||||||
|
|
||||||
""" Adds extra patterns to the root .gitignore file.
|
|
||||||
|
|
||||||
Reads the contents of the filename given as the first argument and appends
|
|
||||||
them to the root .gitignore file. The new entires are intended to be additional
|
|
||||||
ignoring patterns, or negating patterns to override existing entries (man
|
|
||||||
gitignore for more details).
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
MODIFY_STRING = '# The following added by %s\n'
|
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
|
||||||
if not argv[1]:
|
|
||||||
# Special case; do nothing.
|
|
||||||
return 0
|
|
||||||
|
|
||||||
modify_string = MODIFY_STRING % argv[0]
|
|
||||||
gitignore_file = os.path.dirname(argv[0]) + '/../../.gitignore'
|
|
||||||
lines = open(gitignore_file, 'r').readlines()
|
|
||||||
for i, line in enumerate(lines):
|
|
||||||
# Look for modify_string in the file to ensure we don't append the extra
|
|
||||||
# patterns more than once.
|
|
||||||
if line == modify_string:
|
|
||||||
lines = lines[:i]
|
|
||||||
break
|
|
||||||
lines.append(modify_string)
|
|
||||||
|
|
||||||
f = open(gitignore_file, 'w')
|
|
||||||
f.write(''.join(lines))
|
|
||||||
f.write(open(argv[1], 'r').read())
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.exit(main(sys.argv))
|
|
||||||
Loading…
x
Reference in New Issue
Block a user