@@ -407,14 +407,15 @@ def patch(ctx):
407
407
fail ("Error applying patch command %s:\n %s%s" %
408
408
(cmd , st .stdout , st .stderr ))
409
409
410
- def github_proto_repository (name , owner , repo , commit , prefix = "" , build_file_expunge = True , build_file_proto_mode = "file" , ** kwargs ):
410
+ def github_proto_repository (name , owner , repo , commit , prefix = "" , host = "github.com" , build_file_expunge = True , build_file_proto_mode = "file" , ** kwargs ):
411
411
"""github_proto_repository is a macro for a proto_repository hosted at github.com
412
412
413
413
Args:
414
414
name: the name of the rule
415
415
owner: the github owner (e.g. 'protocolbuffers')
416
416
repo: the github repo name (e.g. 'protobuf')
417
417
prefix: the strip_prefix value for the repo (e.g. 'src')
418
+ host: the source host (default 'github.com')
418
419
commit: the git commit (required for this macro)
419
420
build_file_expunge: defaults to true for this macro.
420
421
build_file_proto_mode: defaults to 'file' for this macro.
@@ -427,14 +428,14 @@ def github_proto_repository(name, owner, repo, commit, prefix = "", build_file_e
427
428
428
429
proto_repository (
429
430
name = name ,
430
- source_host = "github.com" ,
431
+ source_host = host ,
431
432
source_owner = owner ,
432
433
source_repo = repo ,
433
434
source_commit = commit ,
434
435
source_prefix = prefix ,
435
436
strip_prefix = strip_prefix ,
436
437
build_file_expunge = build_file_expunge ,
437
438
build_file_proto_mode = build_file_proto_mode ,
438
- urls = ["https://%s/%s/archive/%s.tar.gz" % (owner , repo , commit )],
439
+ urls = ["https://%s/%s/%s/ archive/%s.tar.gz" % (host , owner , repo , commit )],
439
440
** kwargs
440
441
)
0 commit comments