1 @if "%_echo%" neq "on" echo off
2 setlocal EnableDelayedExpansion
5 echo Running Sync.cmd %* > %synclog%
7 set options=/nologo /v:minimal /clp:Summary /flp:v=detailed;Append;LogFile=%synclog%
8 set unprocessedBuildArgs=
22 if [%1]==[] goto Begin
24 if /I [%1] == [/?] goto Usage
25 if /I [%1] == [/help] goto Usage
29 set thisArgs=!thisArgs!%1
35 set thisArgs=!thisArgs!%1
39 set unprocessedBuildArgs=!unprocessedBuildArgs! %1
46 echo Running init-tools.cmd
47 call %~dp0init-tools.cmd
49 if [%src%] == [true] (
50 echo Fetching git database from remote repos ...
51 call git fetch --all -p -v >> %synclog% 2>&1
52 if NOT [!ERRORLEVEL!]==[0] (
53 echo ERROR: An error occurred while fetching remote source code, see %synclog% for more details.
58 set targets=RestoreNETCorePlatforms
60 if [%packages%] == [true] (
61 set options=!options! /t:!targets! /p:RestoreDuringBuild=true
62 echo msbuild.exe %~dp0build.proj !options! !unprocessedBuildArgs! >> %synclog%
63 call msbuild.exe %~dp0build.proj !options! !unprocessedBuildArgs!
64 if NOT [!ERRORLEVEL!]==[0] (
65 echo ERROR: An error occurred while syncing packages, see %synclog% for more details. There may have been networking problems so please try again in a few minutes.
77 echo Repository syncing script.
80 echo /s - Fetches source history from all configured remotes
81 echo (git fetch --all -p -v)
82 echo /p - Restores all nuget packages for repository
84 echo If no option is specified then sync.cmd /s /p is implied.