Add data sync call to get latest

This commit is contained in:
Steve Streeting 2021-05-14 16:13:56 +01:00
parent 36c0b3d2f1
commit 82c489e6d3
2 changed files with 21 additions and 4 deletions

View File

@ -4,6 +4,9 @@ We've found it useful to provide a simple script which can be run on artists'
machines to get the latest from Git, and make sure all the C++ components are machines to get the latest from Git, and make sure all the C++ components are
built. built.
It now also automatically calls `ue4-datasync.ps1 pull` if `UE4SYNCROOT` is defined
in the environment.
While the UE editor can sometimes do this successfully on startup as well, While the UE editor can sometimes do this successfully on startup as well,
it's just nicer to do it as part of the update process - the artist can then it's just nicer to do it as part of the update process - the artist can then
just double-click a shortcut on their desktop and let it run while getting just double-click a shortcut on their desktop and let it run while getting

View File

@ -114,20 +114,34 @@ try {
} }
# Now build # Now build
$args = @() $cmdargs = @()
if ($nocloseeditor) { if ($nocloseeditor) {
$args += "-nocloseeditor" $cmdargs += "-nocloseeditor"
} }
if ($dryrun) { if ($dryrun) {
$args += "-dryrun" $cmdargs += "-dryrun"
} }
# Use Invoke-Expression so we can use a string as options # Use Invoke-Expression so we can use a string as options
Invoke-Expression "&'$PSScriptRoot/ue4-build.ps1' dev $args" Invoke-Expression "&'$PSScriptRoot/ue4-build.ps1' dev $cmdargs"
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
throw "Build process failed, see above" throw "Build process failed, see above"
} }
# Automatically pull lighting builds, if environment variable defined
if ($Env:UE4SYNCROOT) {
$cmdargs = @()
if ($nocloseeditor) {
$cmdargs += "-nocloseeditor"
}
if ($dryrun) {
$cmdargs += "-dryrun"
}
# Use Invoke-Expression so we can use a string as options
Invoke-Expression "&'$PSScriptRoot/ue4-datasync.ps1' pull $cmdargs"
}
Write-Output "-- Get Latest finished OK --" Write-Output "-- Get Latest finished OK --"