mirror of
https://github.com/xxh/xxh
synced 2025-02-17 04:48:26 +00:00
github branch support
This commit is contained in:
parent
846904c474
commit
4fce17eae3
1 changed files with 8 additions and 2 deletions
|
@ -413,8 +413,14 @@ class xxh:
|
|||
continue
|
||||
|
||||
if package_source_type == 'git':
|
||||
self.eprint(f"Git clone {package_source}")
|
||||
[o,e,proc] = self.SC(f'git clone {arg_q} --depth 1 {package_source} {package_dir} 1>&2')
|
||||
if '//github.com/' in package_source and '/tree/' in package_source:
|
||||
github_url = package_source.split('/tree/')[0]
|
||||
github_branch = package_source.split('/tree/')[1]
|
||||
self.eprint(f"Git clone {github_url} from branch '{github_branch}'")
|
||||
[o, e, proc] = self.SC(f"git clone {arg_q} --depth 1 -b '{github_branch}' {github_url} {package_dir} 1>&2")
|
||||
else:
|
||||
self.eprint(f"Git clone {package_source}")
|
||||
[o,e,proc] = self.SC(f'git clone {arg_q} --depth 1 {package_source} {package_dir} 1>&2')
|
||||
if proc.returncode != 0:
|
||||
self.eeprint(f'Error:\n{o.decode().strip()}\n{e.decode().strip()}')
|
||||
elif package_source_type == 'url':
|
||||
|
|
Loading…
Add table
Reference in a new issue