David Pursehouse | 30e128b | 2018-10-12 07:54:16 +0900 | [diff] [blame] | 1 | load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") |
| 2 | |
Owen Li | 2b4838a | 2017-08-04 09:00:51 -0400 | [diff] [blame] | 3 | NAME = "com_googlesource_gerrit_bazlets" |
| 4 | |
| 5 | def load_bazlets( |
Marco Miller | 65f4270 | 2018-09-27 17:10:44 -0400 | [diff] [blame] | 6 | commit, |
| 7 | local_path = None): |
| 8 | if not local_path: |
David Pursehouse | 30e128b | 2018-10-12 07:54:16 +0900 | [diff] [blame] | 9 | git_repository( |
Marco Miller | 65f4270 | 2018-09-27 17:10:44 -0400 | [diff] [blame] | 10 | name = NAME, |
| 11 | remote = "https://gerrit.googlesource.com/bazlets", |
| 12 | commit = commit, |
| 13 | ) |
| 14 | else: |
| 15 | native.local_repository( |
| 16 | name = NAME, |
| 17 | path = local_path, |
| 18 | ) |