Skip to content

Commit a8a05b9

Browse files
committed
Add missing file.
1 parent 910b9fd commit a8a05b9

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

build/git.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from build.ab import Rule, simplerule
2+
from build.utils import add_wildcard_dependency
3+
4+
5+
@Rule
6+
def git_repository(self, name, url, branch, path):
7+
simplerule(
8+
replaces=self,
9+
outs=[f"{path}/.git/config"],
10+
commands=[
11+
f"rmdir {path}/.git",
12+
f"git clone -q {url} --depth=1 -c advice.detachedHead=false -b {branch} {path}",
13+
],
14+
sandbox=False,
15+
generator=True,
16+
label="GITREPOSITORY",
17+
)
18+
19+
add_wildcard_dependency(self, f"{path}/**/*", exclude="**/.git/**")

0 commit comments

Comments
 (0)