Skip to content

Commit 6510fc2

Browse files
committed
Patched get_deps so it will do a fetch/check on a new folder. Some of the deps were failing on a fresh clone of tinyusb
1 parent b5d4d0f commit 6510fc2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/get_deps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,14 @@ def get_a_dep(d):
241241
# Init git deps if not existed
242242
if not p.exists():
243243
p.mkdir(parents=True)
244+
245+
print(f'{p} does not exist... fetching dep')
244246
run_cmd(f"{git_cmd} init")
245247
run_cmd(f"{git_cmd} remote add origin {url}")
248+
249+
print(f'fetching {commit} from {url}')
250+
run_cmd(f"{git_cmd} fetch --depth 1 origin {commit}")
251+
run_cmd(f"{git_cmd} checkout FETCH_HEAD")
246252

247253
# Check if commit is already fetched
248254
result = run_cmd(f"{git_cmd} rev-parse HEAD")

0 commit comments

Comments
 (0)