Skip to content

Commit 7c2518e

Browse files
add conditional to build.cmd so that dotnet core stuff only happens if BUILD_CORECLR was set to 1
1 parent e7ff236 commit 7c2518e

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

build.cmd

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -327,35 +327,37 @@ if '%RestorePackages%' == 'true' (
327327
.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
328328
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
329329
)
330+
if '%BUILD_CORECLR%' == '1' (
330331

331-
:: Restore the Tools directory
332-
call %~dp0init-tools.cmd
332+
:: Restore the Tools directory
333+
call %~dp0init-tools.cmd
333334

334-
set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
335-
pushd .\lkg & %_dotnetexe% restore &popd
336-
@if ERRORLEVEL 1 echo Error: dotnet restore failed && goto :failure
335+
set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
336+
pushd .\lkg & %_dotnetexe% restore &popd
337+
@if ERRORLEVEL 1 echo Error: dotnet restore failed && goto :failure
337338

338-
pushd .\lkg & %_dotnetexe% publish project.json &popd
339-
@if ERRORLEVEL 1 echo Error: dotnet publish failed && goto :failure
339+
pushd .\lkg & %_dotnetexe% publish project.json &popd
340+
@if ERRORLEVEL 1 echo Error: dotnet publish failed && goto :failure
340341

341-
rem rename fsc and coreconsole to allow fsc.exe to to start compiler
342-
pushd .\lkg\bin\debug\netstandard1.6\win7-x64\publish
343-
fc fsc.exe dotnet.exe >nul
344-
@if ERRORLEVEL 1 (
345-
copy fsc.exe fsc.dll
346-
copy dotnet.exe fsc.exe
347-
)
348-
popd
342+
rem rename fsc and coreconsole to allow fsc.exe to to start compiler
343+
pushd .\lkg\bin\debug\netstandard1.6\win7-x64\publish
344+
fc fsc.exe dotnet.exe >nul
345+
@if ERRORLEVEL 1 (
346+
copy fsc.exe fsc.dll
347+
copy dotnet.exe fsc.exe
348+
)
349+
popd
349350

350-
rem rename fsc and coreconsole to allow fsc.exe to to start compiler
351-
pushd .\lkg\bin\debug\netstandard1.6\win7-x64\publish
352-
fc fsi.exe dotnet.exe >nul
353-
@if ERRORLEVEL 1 (
354-
copy fsi.exe fsi.dll
355-
copy dotnet.exe fsi.exe
356-
)
357-
popd
351+
rem rename fsc and coreconsole to allow fsc.exe to to start compiler
352+
pushd .\lkg\bin\debug\netstandard1.6\win7-x64\publish
353+
fc fsi.exe dotnet.exe >nul
354+
@if ERRORLEVEL 1 (
355+
copy fsi.exe fsi.dll
356+
copy dotnet.exe fsi.exe
357+
)
358+
popd
358359

360+
)
359361
rem copy targestfile into tools directory ... temporary fix until packaging complete.
360362
copy src\fsharp\FSharp.Build\Microsoft.FSharp.targets tools\Microsoft.FSharp.targets
361363
copy src\fsharp\FSharp.Build\Microsoft.Portable.FSharp.targets tools\Microsoft.Portable.FSharp.targets

0 commit comments

Comments
 (0)