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

Make fetch-gn and activate-emsdk optional in git-sync-deps #146

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 16 additions & 6 deletions tools/git-sync-deps
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Environment Variables:

GIT_SYNC_DEPS_QUIET: if set to non-empty string, suppress messages.

GIT_SYNC_DEPS_NO_FETCH_GN: if set to non-empty string, bin/fetch-gn
will not be called.

GIT_SYNC_DEPS_NO_ACTIVATE_EMSDK: if set to non-empty string,
bin/activate-emsdk will not be called.

Git Config:
To disable syncing of a single repository:
cd path/to/repository
Expand Down Expand Up @@ -258,18 +264,22 @@ def multithread(function, list_of_arg_lists):
def main(argv):
deps_file_path = os.environ.get('GIT_SYNC_DEPS_PATH', DEFAULT_DEPS_PATH)
verbose = not bool(os.environ.get('GIT_SYNC_DEPS_QUIET', False))
fetch_gn = not bool(os.environ.get('GIT_SYNC_DEPS_NO_FETCH_GN', False))
activate_emsdk = not bool(os.environ.get('GIT_SYNC_DEPS_NO_ACTIVATE_EMSDK', False))

if '--help' in argv or '-h' in argv:
usage(deps_file_path)
return 1

git_sync_deps(deps_file_path, argv, verbose)
subprocess.check_call(
[sys.executable,
os.path.join(os.path.dirname(deps_file_path), 'bin', 'fetch-gn')])
subprocess.check_call(
[sys.executable,
os.path.join(os.path.dirname(deps_file_path), 'bin', 'activate-emsdk')])
if fetch_gn:
subprocess.check_call(
[sys.executable,
os.path.join(os.path.dirname(deps_file_path), 'bin', 'fetch-gn')])
if activate_emsdk:
subprocess.check_call(
[sys.executable,
os.path.join(os.path.dirname(deps_file_path), 'bin', 'activate-emsdk')])
return 0


Expand Down