Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: ensure_dependencies.py

Issue 29869563: Issue 6906 - pack source archives with the correct version (Closed)
Patch Set: Created Aug. 30, 2018, 1:10 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | releaseAutomation.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # This Source Code Form is subject to the terms of the Mozilla Public 3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 6
7 import sys 7 import sys
8 import os 8 import os
9 import posixpath 9 import posixpath
10 import re 10 import re
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 continue 385 continue
386 386
387 repo_cloned = ensure_repo(repodir, parenttype, target, vcs, 387 repo_cloned = ensure_repo(repodir, parenttype, target, vcs,
388 _root.get(vcs, ''), source) 388 _root.get(vcs, ''), source)
389 if repo_types[vcs].istype(target): 389 if repo_types[vcs].istype(target):
390 repo_updated = update_repo(target, vcs, rev) 390 repo_updated = update_repo(target, vcs, rev)
391 npm_outdated = repo_cloned or repo_updated 391 npm_outdated = repo_cloned or repo_updated
392 else: 392 else:
393 vcs = None 393 vcs = None
394 npm_outdated = not os.path.exists( 394 npm_outdated = not os.path.exists(
395 os.path.join(target, 'node_modules') 395 os.path.join(target, 'node_modules'),
tlucas 2018/08/30 13:12:46 While at it, i also fixed this. This will be in an
396 ) 396 )
397 397
398 recent_npm_failed = os.path.exists(os.path.join(target, NPM_LOCKFILE)) 398 recent_npm_failed = os.path.exists(os.path.join(target, NPM_LOCKFILE))
399 if npm_outdated or recent_npm_failed: 399 if npm_outdated or recent_npm_failed:
400 resolve_npm_dependencies(target, vcs) 400 resolve_npm_dependencies(target, vcs)
401 401
402 resolve_deps(target, vcs, level + 1, self_update=False, 402 resolve_deps(target, vcs, level + 1, self_update=False,
403 overrideroots=overrideroots, skipdependencies=skipdependenc ies) 403 overrideroots=overrideroots, skipdependencies=skipdependenc ies)
404 404
405 if self_update and '_self' in config and '*' in config['_self']: 405 if self_update and '_self' in config and '*' in config['_self']:
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 args = parser.parse_args() 449 args = parser.parse_args()
450 450
451 if args.quiet: 451 if args.quiet:
452 logging.disable(logging.INFO) 452 logging.disable(logging.INFO)
453 453
454 repos = args.repos 454 repos = args.repos
455 if not len(repos): 455 if not len(repos):
456 repos = [os.path.dirname(__file__)] 456 repos = [os.path.dirname(__file__)]
457 for repo in repos: 457 for repo in repos:
458 resolve_deps(repo, get_repo_type(repo)) 458 resolve_deps(repo, get_repo_type(repo))
OLDNEW
« no previous file with comments | « no previous file | releaseAutomation.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld