Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps enahancements #1044

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions scripts/update_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,15 @@ def Checkout(self):
if VERBOSE:
print('Checking out {n} in {d}'.format(n=self.name, d=self.repo_dir))

if self._args.do_clean_repo:
if os.path.exists(os.path.join(self.repo_dir, '.git')):
url_changed = command_output(['git', 'config', '--get', 'remote.origin.url'], self.repo_dir).strip() != self.url
else:
url_changed = False

if self._args.do_clean_repo or url_changed:
if os.path.isdir(self.repo_dir):
if VERBOSE:
print('Clearing directory {d}'.format(d=self.repo_dir))
shutil.rmtree(self.repo_dir, onerror = on_rm_error)
if not os.path.exists(os.path.join(self.repo_dir, '.git')):
self.Clone()
Expand Down Expand Up @@ -615,7 +622,7 @@ def CreateHelper(args, repos, filename):
if repo.api is not None and repo.api != args.api:
continue
if install_names and repo.name in install_names and repo.on_build_platform:
helper_file.write('set({var} "{dir}" CACHE STRING "" FORCE)\n'
helper_file.write('set({var} "{dir}" CACHE STRING "")\n'
.format(
var=install_names[repo.name],
dir=escape(repo.install_dir)))
Expand Down
Loading