Fix a bug where precompiled list of SDKs would not attempted to be downloaded if git was not present on the system. Fixes https://github.com/kripken/emscripten/issues/6165.
This commit is contained in:
30
emsdk
30
emsdk
@@ -1508,21 +1508,10 @@ def python_2_3_sorted(arr, cmp):
|
||||
|
||||
def fetch_emscripten_tags():
|
||||
git = GIT(must_succeed=False)
|
||||
if not git:
|
||||
print('Update complete, however skipped fetching the Emscripten tags, since git was not found.')
|
||||
if WINDOWS:
|
||||
print("If you want to compile one of the tagged releases from source, please install git by typing 'emsdk install git-1.9.4', or alternatively by installing it manually from http://git-scm.com/downloads . If you install git manually, remember to add it to PATH.")
|
||||
elif OSX:
|
||||
print("If you want to compile one of the tagged releases from source, please install git from http://git-scm.com/ , or by installing XCode and then the XCode Command Line Tools (see http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools ).")
|
||||
elif LINUX:
|
||||
print("If you want to compile one of the tagged releases from source, please install git using your package manager, see http://git-scm.com/book/en/Getting-Started-Installing-Git .")
|
||||
else:
|
||||
print("If you want to compile one of the tagged releases from source, please install git.")
|
||||
print("If you are not looking to build Emscripten from source, you can safely ignore this message.")
|
||||
return
|
||||
|
||||
if git:
|
||||
print('Fetching all tags from Emscripten Github repository...')
|
||||
tags = run_get_output([GIT(), 'ls-remote', '--tags', emscripten_git_repo])
|
||||
tags = run_get_output([git, 'ls-remote', '--tags', emscripten_git_repo])
|
||||
if tags[0] != 0: return False # failed to get tags?
|
||||
tags = tags[1]
|
||||
all_tags = []
|
||||
@@ -1541,7 +1530,7 @@ def fetch_emscripten_tags():
|
||||
print('Done. No tagged releases available.')
|
||||
|
||||
print('Fetching all tags from Binaryen Github repository...')
|
||||
tags = run_get_output([GIT(), 'ls-remote', '--tags', binaryen_git_repo])
|
||||
tags = run_get_output([git, 'ls-remote', '--tags', binaryen_git_repo])
|
||||
if tags[0] != 0: return False # failed to get tags?
|
||||
tags = tags[1]
|
||||
binaryen_tags = []
|
||||
@@ -1576,6 +1565,19 @@ def fetch_emscripten_tags():
|
||||
download_file('https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/tag/' + os_name_for_llvm_location() + '_32bit/index.txt', 'llvm-tags-32bit.txt', download_even_if_exists=True)
|
||||
download_file('https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/tag/' + os_name_for_llvm_location() + '_64bit/index.txt', 'llvm-tags-64bit.txt', download_even_if_exists=True)
|
||||
|
||||
if not git:
|
||||
print('Update complete, however skipped fetching the Emscripten tags, since git was not found.')
|
||||
if WINDOWS:
|
||||
print("If you want to compile one of the tagged releases from source, please install git by typing 'emsdk install git-1.9.4', or alternatively by installing it manually from http://git-scm.com/downloads . If you install git manually, remember to add it to PATH.")
|
||||
elif OSX:
|
||||
print("If you want to compile one of the tagged releases from source, please install git from http://git-scm.com/ , or by installing XCode and then the XCode Command Line Tools (see http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools ).")
|
||||
elif LINUX:
|
||||
print("If you want to compile one of the tagged releases from source, please install git using your package manager, see http://git-scm.com/book/en/Getting-Started-Installing-Git .")
|
||||
else:
|
||||
print("If you want to compile one of the tagged releases from source, please install git.")
|
||||
print("If you are not looking to build Emscripten from source, you can safely ignore this message.")
|
||||
return
|
||||
|
||||
def is_emsdk_sourced_from_github():
|
||||
return os.path.exists(os.path.join(emsdk_path(), '.git'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user