-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpull-all.ps1
More file actions
34 lines (32 loc) · 1.09 KB
/
Copy pathpull-all.ps1
File metadata and controls
34 lines (32 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
param(
[switch]$Editor,
[switch]$Vendor,
[string]$GitProxy = ''
)
$ErrorActionPreference = "Stop"
. (Join-Path $PSScriptRoot "no-proxy.ps1")
. (Join-Path $PSScriptRoot "oss-hydrate-env.ps1")
$Root = Resolve-Path (Join-Path $PSScriptRoot "..")
Push-Location $Root
try {
Mask-GameDraftProxyEnvironmentProcess
Invoke-GameDraftGitWithTemporaryProxy -ProxyUrl $GitProxy pull
& (Join-Path $PSScriptRoot "bootstrap-dvc.ps1")
Assert-OssCredentialsInProcess
$Python = Join-Path $Root ".tools\Python311\python.exe"
Invoke-OssWithoutProxy {
& $Python (Join-Path $PSScriptRoot "sync-dvc-cache.py") pull "public/resources/runtime.dvc"
& $Python -m dvc checkout "public/resources/runtime.dvc"
if ($Editor) {
& $Python (Join-Path $PSScriptRoot "sync-dvc-cache.py") pull "resources/editor_projects.dvc"
& $Python -m dvc checkout "resources/editor_projects.dvc"
}
if ($Vendor) {
& $Python (Join-Path $PSScriptRoot "sync-dvc-cache.py") pull "resources/vendor_archives.dvc"
& $Python -m dvc checkout "resources/vendor_archives.dvc"
}
}
}
finally {
Pop-Location
}