Commit ff7fb95e by Mike Weiblen

Fix external update script for GitHub SSH access

Modify the update_glslang_sources_khr.py script to use SSH protocol for GitLab rather than HTTPS
parent a6e55436
...@@ -28,9 +28,9 @@ import sys ...@@ -28,9 +28,9 @@ import sys
KNOWN_GOOD_FILE = 'known_good_khr.json' KNOWN_GOOD_FILE = 'known_good_khr.json'
# Maps a site name to its hostname. # Maps a site name to its host URL.
SITE_TO_HOST = { 'github' : 'github.com', SITE_TO_HOST = { 'github' : 'https://github.com/',
'gitlab' : 'gitlab.khronos.org' } 'gitlab' : 'git@gitlab.khronos.org:' }
VERBOSE = True VERBOSE = True
...@@ -83,14 +83,11 @@ class GoodCommit(object): ...@@ -83,14 +83,11 @@ class GoodCommit(object):
self.subdir = json['subdir'] if ('subdir' in json) else '.' self.subdir = json['subdir'] if ('subdir' in json) else '.'
self.commit = json['commit'] self.commit = json['commit']
def GetUrl(self, style='https'): def GetUrl(self):
"""Returns the URL for the repository.""" """Returns the URL for the repository."""
host = SITE_TO_HOST[self.site] host = SITE_TO_HOST[self.site]
sep = '/' if (style is 'https') else ':' return '{host}{subrepo}'.format(
return '{style}://{host}{sep}{subrepo}'.format(
style=style,
host=host, host=host,
sep=sep,
subrepo=self.subrepo) subrepo=self.subrepo)
def AddRemote(self): def AddRemote(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment