File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 15
15
version: Version
16
16
vcsRevision: Sha1Hash
17
17
18
+ proc updateSubmodules(dir: string ) =
19
+ discard tryDoCmdEx(
20
+ & " git -C { dir} submodule update --init --recursive --depth 1 " )
21
+
18
22
proc doCheckout(meth: DownloadMethod, downloadDir, branch: string ) =
19
23
case meth
20
24
of DownloadMethod.git:
21
25
# Force is used here because local changes may appear straight after a clone
22
26
# has happened. Like in the case of git on Windows where it messes up the
23
27
# damn line endings.
24
- discard tryDoCmdEx(& " git -C { downloadDir} checkout --force { branch} " )
25
- discard tryDoCmdEx(
26
- & " git -C { downloadDir} submodule update --recursive --depth 1 " )
28
+ discard tryDoCmdEx(& " git -C { downloadDir} checkout --force { branch} " )
29
+ downloadDir.updateSubmodules
27
30
of DownloadMethod.hg:
28
31
discard tryDoCmdEx(& " hg --cwd { downloadDir} checkout { branch} " )
29
32
@@ -149,6 +152,7 @@ proc cloneSpecificRevision(downloadMethod: DownloadMethod,
149
152
discard tryDoCmdEx(
150
153
& " git -C { downloadDir} fetch --depth 1 origin { vcsRevision} " )
151
154
discard tryDoCmdEx(& " git -C { downloadDir} reset --hard FETCH_HEAD " )
155
+ downloadDir.updateSubmodules
152
156
of DownloadMethod.hg:
153
157
discard tryDoCmdEx(& " hg clone { url} -r { vcsRevision} " )
154
158
You can’t perform that action at this time.
0 commit comments