Skip to content

Commit

Permalink
Update build tools to latest (#1651)
Browse files Browse the repository at this point in the history
* Always use FSharp.Core not fsharp.core (#1610)

* simplify use of if-defs (#1614)

* Don't try to deploy vsix during OSS build.  Specify prereq in vsixmanifest (#1613)

* Add fsx files to workspaces (#1612)

* Add fsx files to workspaces

* Stop passing project output paths to CPS

* Read script file contents from memory (on workspace initialization)

* (Nugetize F# templates.  Ensure value tuple installed on create template. (#1620)

* Don't match braces at the end of the caret (#1619)

* FSharp ms build task to support new xommand line options (#1616)

* Add support for generating sourcelink record in portable pdbs.  Fixes #1585

* Ensure that portable libraries have correct hintpath for preview 5

* Ensure that portable libraries have correct hintpath for preview 5 (#1624)

* cleanup build and test scripts (#1615)

* cleanup build and test scripts

* Replaced missed file

* Fix merge issue

* fix merge error

* update build tools

* reset build_coreclr

* Fix coreclr proto build

* Typo
  • Loading branch information
KevinRansom authored Oct 25, 2016
1 parent 4a27561 commit a9f3f4a
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 16 deletions.
2 changes: 1 addition & 1 deletion BuildToolsVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.26-prerelease-00625-01
1.0.26-prerelease-00920-02
2 changes: 1 addition & 1 deletion DotnetCLIVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-preview2-003121
1.0.0-preview3-003886
3 changes: 2 additions & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ goto :success
rem disable setup build by setting FSC_BUILD_SETUP=0
if /i '%FSC_BUILD_SETUP%' == '' (set FSC_BUILD_SETUP=1)

set BUILD_PROTO_WITH_CORECLR_LKG=0
rem by default don't build coreclr lkg. However allow configuration by setting an environment variable : set BUILD_PROTO_WITH_CORECLR_LKG = 1
if '%BUILD_PROTO_WITH_CORECLR_LKG%' =='' (set BUILD_PROTO_WITH_CORECLR_LKG=0)

set BUILD_PROTO=0
set BUILD_PHASE=1
Expand Down
31 changes: 20 additions & 11 deletions init-tools.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@if "%_echo%" neq "on" echo off
@if not defined _echo @echo off
setlocal

set INIT_TOOLS_LOG=%~dp0init-tools.log
Expand Down Expand Up @@ -32,43 +32,52 @@ if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
echo %PROJECT_JSON_CONTENTS% > "%PROJECT_JSON_FILE%"
echo Running %0 > "%INIT_TOOLS_LOG%"

set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
if exist "%DOTNET_CMD%" goto :afterdotnetrestore

echo Installing dotnet cli...
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
set DOTNET_ZIP_NAME=dotnet-dev-win-x64.%DOTNET_VERSION%.zip
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; do { try { (New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $retryCount++; Start-Sleep -Seconds (5 * $retryCount); } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
if NOT exist "%DOTNET_LOCAL_PATH%" (
echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details.
echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details. 1>&2
exit /b 1
)

:afterdotnetrestore

if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details.
echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details. 1>&2
exit /b 1
)

:afterbuildtoolsrestore

echo Initializing BuildTools ...
echo Initializing BuildTools...
echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
set INIT_TOOLS_ERRORLEVEL=%ERRORLEVEL%
if not [%INIT_TOOLS_ERRORLEVEL%]==[0] (
echo ERROR: An error occured when trying to initialize the tools. Please check '%INIT_TOOLS_LOG%' for more details.
exit /b %INIT_TOOLS_ERRORLEVEL%
echo ERROR: An error occured when trying to initialize the tools. Please check '%INIT_TOOLS_LOG%' for more details. 1>&2
exit /b %INIT_TOOLS_ERRORLEVEL%
)

echo Updating CLI NuGet Frameworks map...
robocopy "%TOOLRUNTIME_DIR%" "%TOOLRUNTIME_DIR%\dotnetcli\sdk\%DOTNET_VERSION%" NuGet.Frameworks.dll /XO >> "%INIT_TOOLS_LOG%"
set UPDATE_CLI_ERRORLEVEL=%ERRORLEVEL%
if %UPDATE_CLI_ERRORLEVEL% GTR 1 (
echo ERROR: Failed to update Nuget for CLI {Error level %UPDATE_CLI_ERRORLEVEL%}. Please check '%INIT_TOOLS_LOG%' for more details. 1>&2
exit /b %UPDATE_CLI_ERRORLEVEL%
)

:: Create sempahore file
echo Done initializing tools.
echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"
echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"
exit /b 0
17 changes: 17 additions & 0 deletions src/FSharpSource.Settings.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- If Configuration is empty that means we are not being built in VS and so folks need to explicitly pass the different
values for $(ConfigurationGroup), $(TargetGroup), or $(OSGroup) or accept the defaults for them.
-->
<PropertyGroup Condition="'$(Configuration)'==''">
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
<Configuration>$(ConfigurationGroup)</Configuration>
<Configuration Condition="'$(TargetGroup)'!=''">$(TargetGroup)_$(Configuration)</Configuration>
<Configuration Condition="'$(OSGroup)'!='' and '$(OSGroup)'!='AnyOS'">$(OSGroup)_$(Configuration)</Configuration>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'!=''">
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.ToLower().EndsWith('debug'))">Debug</ConfigurationGroup>
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.ToLower().EndsWith('release'))">Release</ConfigurationGroup>
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
</PropertyGroup>

<PropertyGroup>
<!-- Tail calls on, even in debug -->
<Tailcalls>true</Tailcalls>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
</PropertyGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<SchemaVersion>2.0</SchemaVersion>
<AllowCrossTargeting>true</AllowCrossTargeting>
Expand Down
1 change: 0 additions & 1 deletion src/fsharp/FSharp.Core/FSharp.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FSharpSourcesRoot>..\..</FSharpSourcesRoot>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
</PropertyGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.Settings.targets" />
<PropertyGroup>
Expand Down

0 comments on commit a9f3f4a

Please sign in to comment.