Core-Setup on Buildtools (#2187)
* update .gitignore * Add bootstrap for buildtools and run tool * Add dev workflow commands clean/sync for Windows * Update supported target rids and target archs * Compile corehost via run.exe * Add main build.proj * Update config.json * Enable PkgPackage prject using buildtools * Fix path to version.txt * Add dir.proj for src * Move custom tasks to root leve * build custom tasks * build corehost using build.cmd * Build src packages using build.cmd * Add custom build option to run.exe config * Add custom task - GetBuildableFramework * add props header * improve BuildProjectsForNuGetPackages * Move deps clean to its own task * Fix lockfile publishing * Fix ExeSuffix prop * Fix runtime Graph generation prop * Enable tests through run.exe * Enable packaging for win and mac * custom tasks sln * start fixing tests * Fix test paths * firx custom task * Generate Svg badge from msbuild * Move GenerateMsiVersion to its own custom task * Generate stable Guids using custom task * Make run.sh executable * Add clean and sync scripts for *nix * Fixes for unix * Enable packaging for OSX * Generate debs part 1 * Import deb packaging targets * Fix osx packaging * Fix typo * Fix RuntimeGraph. removing lower casing * Packages debs part 2 * Minor fixes for GenerateDebs * Complete Generate Debs * Update versions * Add flag to control generating deb pkgs * Pack dotnet-deb-tool * First version for build.sh * Update packaging * Add packaging to full build * Update dependencies * move custom tasks under build/tasks * P.R. comments part 1 * Add ReplaceFileContents task * Use ReplaceFileContents task * Update .gitignore * Fix template for shared framework * PR feedback * move sign.proj to root * Update sign.proj * Update version * Add missing file * Fixing the --fallbacksource to be correct. * Fix pkg build * Add missing Msi ugrade code and fix namesfor existing * Moving folders * Refactor and update versioning * publish finalizing * publish finalization * Intermediate change, fixing build after merge * Merge fixes * Enable partial testing build, and bringing back publishing which was lost * Publishing * Enable hostactivationtests * actually add publishing targets * update gitignore * make Bin and Packages capitalized because they're external * update readme.md with dnvm urls * msi version change, test fixes * Enable publish to nuget during publishing * Add build.sh change * Enable tests * Add test failure summary * Update microsoft.netcore.app platform version testing against * Delete xml file which shouldn't be added * Testing changes * Test fixes * Minor cleanup, auto-derive test target rid if it's not specified * Cleanup before test run to prevent failures caused after successive reruns * Remove versions junction which breaks testing since it picks the wrong version * Enable linux build * Fix linux compression, avoid "file chaned as we read it" error * Fix linux test builds * Test changes for Linux * Minor fixes for Windows * Change nuget feed for validation * use buildtools repo * separate run into run and init * Use corefx style docker builds * Use build.sourcesdirectory * chmod +x init.sh * add pb_gitdirectory variable * Use inittools instead of bootstrap * Chmod +x init-tools.sh * Update crossgen to be +x * Fix casing looking for platforms package * Fix buildtoolstaskdir * set default localbuildtoolstaskdir * set nuget_packages when running dotnet build for src/managed projects * set absolute path for items * Add missing docker-as-current-user.sh script * chmod+x the docker run scripts * print command for debugging * remove uneccessary debugging echo * print debugging message * chmod+x init-tools.sh * Add debugging messages * fix typo * Fix casing * chmod+x boostrap.sh * Update bootstrap script * display debug message * Fix typo * temporarily add dotnet-install.sh script * Relax min req for dotnet-obtain * relax reqs in bootstrap * make copy verbose to debug * Fix typo * add -p to mkdir in bootstrap * Add another -p to mkdir in bootstrap * try to fix exit code check * bootstrap verbose * Use wget as a fallback for distros without curl * misc fixes * make crossgen optional based on existence of script * Add nuget default timeout * Add default containername * Remove verbose option from bootstrap call * only publish corehost packages if finalization has completed * Check in updated linux build def * update docker tags * pass distrorid for publishing * Fix definition name * Generate version assets * buildpipeline changes, enabling windows * Add target to build traversal build dependencies * Add tools-override copy to init-tools * Change roslyn version * Fix building traversal build dependencies logic * Create the version info file * Add hook to opt out of including all runtime packages for testing purposes * absolute paths to prevent build break when building a sub project from a different working directory * copy custom task dependency to local task directory * Add platformabstractions to custom-task dependencies * try adding back temp folder * dotnet restore for tests requires nugetfallbackfolder be present * set test rid with targetarchitecture * Add windows builds * hack the osx distrorid * use packagetargetrid for sharedframework project * Publish packagetargetrid * Remove osx.10.12 from packagetargetrid change list * Remove hack, not needed now that packagetargetrid is fixed * Add osx * misc build changes * rename compression -> packaging, and some portable build changes * misc merge changes * Update dependency versions * Enable portable linux build * update to netci.groovy * Remove -targets qualifier from netci.groovy * run parses parameter/values with = separator * set unrestricted execution policy when calling powershell * move wix toolset extraction into msbuild so we don't have a dependency on powershell v5.0+ * print slightly more debug info * switch path separator char * Custom zipfileextracttodirectory task * Add references for compression task * Don't delete destination directory * remove branched zip extraction task * tweak the groovy file to make testing easier * change disable to disabled * Change ci platform build list * load sln's even if buildtools isn't restored * Allow loading sln's even if buildtools not restored * hack osx rid * Fix typo
This commit is contained in:
Родитель
1a195046fd
Коммит
6887ab556b
|
@ -1,53 +1,9 @@
|
|||
### Repo-specific things ###
|
||||
syntax: glob
|
||||
|
||||
# RootFS used for cross-compilation
|
||||
cross/rootfs
|
||||
### VisualStudio ###
|
||||
|
||||
# Test results
|
||||
*-testResults.xml
|
||||
|
||||
# Multicore JIT Optimization profiles
|
||||
**/optimizationdata/dotnet
|
||||
|
||||
# NuGet keeps dropping
|
||||
Library/
|
||||
|
||||
# NuGet v3 restore drops these even though we don't use MSBuild :(
|
||||
*.nuget.targets
|
||||
*.nuget.props
|
||||
|
||||
# Repo Local Package Cache
|
||||
.nuget/
|
||||
|
||||
# Debian and python stuff
|
||||
*.dsc
|
||||
*.tar.gz
|
||||
*.build
|
||||
*.changes
|
||||
*.deb
|
||||
*.pyc
|
||||
*.pyo
|
||||
|
||||
# OSX Packaging temp files
|
||||
*.pkg
|
||||
|
||||
# OS X Device Services Store
|
||||
.DS_Store
|
||||
|
||||
# CMake generated files
|
||||
cmake/
|
||||
|
||||
# stage0 install directory
|
||||
.dotnet_stage0
|
||||
|
||||
# `dotnet new` project.json.template files are generated by a pre-build step.
|
||||
# ignore these files
|
||||
/src/dotnet/commands/dotnet-new/**/project.json.template
|
||||
|
||||
### VisualStudio.gitignore from https://raw.githubusercontent.com/github/gitignore/master/VisualStudio.gitignore ###
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
# Tool Runtime Dir
|
||||
/[Tt]ools/
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
|
@ -55,9 +11,6 @@ cmake/
|
|||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
|
@ -69,21 +22,28 @@ build/
|
|||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
msbuild.log
|
||||
msbuild.err
|
||||
msbuild.wrn
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
# Cross building rootfs
|
||||
cross/rootfs/
|
||||
cross/android-rootfs/
|
||||
# add x86 as it is ignored in 'Build results'
|
||||
!cross/x86
|
||||
|
||||
# Visual Studio 2015
|
||||
.vs/
|
||||
|
||||
# Visual Studio Code cache/options directory
|
||||
.vscode/
|
||||
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
# Visual Studio 2015 Pre-CTP6
|
||||
*.sln.ide
|
||||
*.ide/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
#NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
|
@ -92,10 +52,6 @@ TestResult.xml
|
|||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
|
@ -133,13 +89,11 @@ ipch/
|
|||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
@ -151,10 +105,8 @@ $tf/
|
|||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
.idea/
|
||||
*.iml
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
# JustCode is a .NET coding addin-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
|
@ -166,7 +118,6 @@ _TeamCity*
|
|||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
|
@ -188,54 +139,41 @@ DocProject/Help/*.hhp
|
|||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# NuGet Packages
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
|
||||
# NuGet package restore lockfiles
|
||||
project.lock.json
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Windows Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
*.metaproj
|
||||
*.metaproj.tmp
|
||||
bin.localpkg/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
@ -260,40 +198,76 @@ UpgradeLog*.htm
|
|||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
### MonoDevelop ###
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
*.pidb
|
||||
*.userprefs
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
### Windows ###
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Exceptions
|
||||
# Build Scripts
|
||||
!scripts/build/
|
||||
test/PackagedCommands/Consumers/*/project.json
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# Vim swp files
|
||||
*.swp
|
||||
*.*~
|
||||
### Linux ###
|
||||
|
||||
*~
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
### OSX ###
|
||||
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear on external disk
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# vim temporary files
|
||||
[._]*.s[a-w][a-z]
|
||||
[._]s[a-w][a-z]
|
||||
*.un~
|
||||
Session.vim
|
||||
.netrwhist
|
||||
*~
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
|
||||
# Private test configuration and binaries.
|
||||
config.ps1
|
||||
**/IISApplications
|
||||
|
||||
# VS generated files
|
||||
launchSettings.json
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1.0.27-prerelease-01430-03
|
|
@ -9,31 +9,31 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||
NuGet.Config = NuGet.Config
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setuptools", "setuptools", "{0722D325-24C8-4E83-B5AF-0A083E7F0749}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setuptools", "tools-local\setuptools", "{0722D325-24C8-4E83-B5AF-0A083E7F0749}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build_projects", "build_projects", "{88278B81-7649-45DC-8A6A-D3A645C5AFC3}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "src\build", "{88278B81-7649-45DC-8A6A-D3A645C5AFC3}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Cli.Build.Framework", "build_projects\Microsoft.DotNet.Cli.Build.Framework\Microsoft.DotNet.Cli.Build.Framework.xproj", "{49BEB486-AB5A-4416-91EA-8CD34ABB0C9D}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.DotNet.Cli.Build.Framework", "src\build\Microsoft.DotNet.Cli.Build.Framework\Microsoft.DotNet.Cli.Build.Framework.xproj", "{49BEB486-AB5A-4416-91EA-8CD34ABB0C9D}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "shared-build-targets-utils", "build_projects\shared-build-targets-utils\shared-build-targets-utils.xproj", "{B768BD29-12BF-4C7C-B093-03193FE244D1}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "shared-build-targets-utils", "src\build\shared-build-targets-utils\shared-build-targets-utils.xproj", "{B768BD29-12BF-4C7C-B093-03193FE244D1}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-host-build", "build_projects\dotnet-host-build\dotnet-host-build.xproj", "{1DBB7542-0345-4F4B-A84B-3B00B185D416}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-host-build", "src\build\dotnet-host-build\dotnet-host-build.xproj", "{1DBB7542-0345-4F4B-A84B-3B00B185D416}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RuntimeGraphGenerator", "setuptools\independent\RuntimeGraphGenerator\RuntimeGraphGenerator.xproj", "{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "RuntimeGraphGenerator", "tools-local\setuptools\independent\RuntimeGraphGenerator\RuntimeGraphGenerator.xproj", "{EFC4FE68-83EB-40E4-BFA8-61D0B4626F25}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "update-dependencies", "build_projects\update-dependencies\update-dependencies.xproj", "{A28BD8AC-DF15-4F58-8299-98A9AE2B8726}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "update-dependencies", "src\build\update-dependencies\update-dependencies.xproj", "{A28BD8AC-DF15-4F58-8299-98A9AE2B8726}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5CE8410C-3100-4F41-8FA9-E6B4132D9703}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "HostActivationTests", "test\HostActivationTests\HostActivationTests.xproj", "{386D412C-003C-47B1-8258-0E35865CB7C4}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "HostActivationTests", "src\test\HostActivationTests\HostActivationTests.xproj", "{386D412C-003C-47B1-8258-0E35865CB7C4}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-deb-tool", "setuptools\dotnet-deb-tool\dotnet-deb-tool.xproj", "{F39F3D8B-B26F-4C77-B08C-D6CA753EE84E}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "dotnet-deb-tool", "tools-local\setuptools\dotnet-deb-tool\dotnet-deb-tool.xproj", "{F39F3D8B-B26F-4C77-B08C-D6CA753EE84E}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestUtils", "test\TestUtils\TestUtils.xproj", "{42095367-4423-4157-BD31-D1A8E3B823B9}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestUtils", "src\test\TestUtils\TestUtils.xproj", "{42095367-4423-4157-BD31-D1A8E3B823B9}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.DependencyModel", "src\Microsoft.Extensions.DependencyModel\Microsoft.Extensions.DependencyModel.xproj", "{688870C8-9843-4F9E-8576-D39290AD0F25}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.DependencyModel.Tests", "test\Microsoft.Extensions.DependencyModel.Tests\Microsoft.Extensions.DependencyModel.Tests.xproj", "{4A4711D8-4312-49FC-87B5-4F183F4C6A51}"
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.DependencyModel.Tests", "src\test\Microsoft.Extensions.DependencyModel.Tests\Microsoft.Extensions.DependencyModel.Tests.xproj", "{4A4711D8-4312-49FC-87B5-4F183F4C6A51}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FAA448DA-7D1C-4481-915D-5765BF906332}"
|
||||
EndProject
|
||||
|
|
14
NuGet.Config
14
NuGet.Config
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<!-- To inherit the global NuGet package sources remove the <clear/> line below -->
|
||||
<clear />
|
||||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
<add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
|
||||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="corefxlab" value="https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
|
||||
</packageSources>
|
||||
<disabledPackageSources>
|
||||
<clear />
|
||||
</disabledPackageSources>
|
||||
</configuration>
|
|
@ -131,7 +131,7 @@ Daily Builds
|
|||
[linux-arm-symbols-targz-master-portable]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/dotnet-sharedframework-symbols-linux-arm.latest-portable.tar.gz
|
||||
|
||||
[ubuntu-14.04-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Ubuntu_x64_Release_version_badge.svg
|
||||
[ubuntu-14.04-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.ubuntu.x64.version
|
||||
[ubuntu-14.04-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.ubuntu.14.04-x64.version
|
||||
[ubuntu-14.04-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-host-ubuntu-x64.latest.deb
|
||||
[ubuntu-14.04-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-hostfxr-ubuntu-x64.latest.deb
|
||||
[ubuntu-14.04-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-sharedframework-ubuntu-x64.latest.deb
|
||||
|
@ -154,7 +154,7 @@ Daily Builds
|
|||
|
||||
|
||||
[ubuntu-16.04-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Ubuntu_16_04_x64_Release_version_badge.svg
|
||||
[ubuntu-16.04-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.ubuntu.16.04.x64.version
|
||||
[ubuntu-16.04-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.ubuntu.16.04-x64.version
|
||||
[ubuntu-16.04-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-host-ubuntu.16.04-x64.latest.deb
|
||||
[ubuntu-16.04-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-hostfxr-ubuntu.16.04-x64.latest.deb
|
||||
[ubuntu-16.04-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-sharedframework-ubuntu.16.04-x64.latest.deb
|
||||
|
@ -169,7 +169,7 @@ Daily Builds
|
|||
[ubuntu-16.04-targz-1.1.X]: https://dotnetcli.blob.core.windows.net/dotnet/release/1.1.0/Binaries/Latest/dotnet-ubuntu.16.04-x64.latest.tar.gz
|
||||
|
||||
[ubuntu-16.04-badge-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/Latest/sharedfx_Ubuntu_16_04_x64_Release_version_badge.svg
|
||||
[ubuntu-16.04-version-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.sharedfx.ubuntu.16.04.x64.version
|
||||
[ubuntu-16.04-version-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/dnvm/latest.sharedfx.ubuntu.16.04-x64.version
|
||||
[ubuntu-16.04-host-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-host-ubuntu.16.04-x64.latest.deb
|
||||
[ubuntu-16.04-hostfxr-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-hostfxr-ubuntu.16.04-x64.latest.deb
|
||||
[ubuntu-16.04-sharedfx-preview]: https://dotnetcli.blob.core.windows.net/dotnet/preview/Installers/Latest/dotnet-sharedframework-ubuntu.16.04-x64.latest.deb
|
||||
|
@ -193,7 +193,7 @@ Daily Builds
|
|||
|
||||
|
||||
[debian-8.2-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Binaries/Latest/sharedfx_Debian_x64_Release_version_badge.svg
|
||||
[debian-8.2-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.debian.x64.version
|
||||
[debian-8.2-version-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/dnvm/latest.sharedfx.debian.8-x64.version
|
||||
[debian-8.2-host-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-host-debian-x64.latest.deb
|
||||
[debian-8.2-hostfxr-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-hostfxr-debian-x64.latest.deb
|
||||
[debian-8.2-sharedfx-master]: https://dotnetcli.blob.core.windows.net/dotnet/master/Installers/Latest/dotnet-sharedframework-debian-x64.latest.deb
|
||||
|
|
37
build.cmd
37
build.cmd
|
@ -1,35 +1,2 @@
|
|||
@echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
:Arg_Loop
|
||||
:: Since the native build requires some configuration information before msbuild is called, we have to do some manual args parsing
|
||||
if [%1] == [] goto :InvokeBuild
|
||||
if /i [%1] == [-TargetArch] (
|
||||
|
||||
if /i [%2] == [arm64] (
|
||||
set __BuildArch=x86_amd64
|
||||
)
|
||||
|
||||
if /i [%2] == [arm] (
|
||||
set __BuildArch=x86_arm
|
||||
)
|
||||
|
||||
if not defined VS140COMNTOOLS (
|
||||
echo Error: Visual Studio 2015 required
|
||||
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" !__BuildArch!
|
||||
goto :InvokeBuild
|
||||
)
|
||||
|
||||
shift
|
||||
goto :Arg_Loop
|
||||
|
||||
:InvokeBuild
|
||||
powershell -NoProfile -NoLogo -Command "%~dp0build_projects\dotnet-host-build\build.ps1 %*; exit $LastExitCode;"
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
@call %~dp0run.cmd build %*
|
||||
@exit /b %ERRORLEVEL%
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="BuildAndTest" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="dir.props" />
|
||||
|
||||
<!-- required to build the projects in their specified order -->
|
||||
<PropertyGroup>
|
||||
<SerializeProjects>true</SerializeProjects>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
|
||||
<RestoreDuringBuild Condition="'$(RestoreDuringBuild)'==''">true</RestoreDuringBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TraversalBuildDependencies>
|
||||
BatchRestorePackages;
|
||||
ValidateExactRestore;
|
||||
CreateOrUpdateCurrentVersionFile;
|
||||
CreateVersionInfoFile;
|
||||
BuildCustomTasks;
|
||||
</TraversalBuildDependencies>
|
||||
<TraversalBuildDependsOn>
|
||||
$(TraversalBuildDependencies);
|
||||
$(TraversalBuildDependsOn);
|
||||
</TraversalBuildDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Project Include="src/dir.proj" />
|
||||
<Project Include="src/pkg/packaging/dir.proj"/>
|
||||
<Project Include="$(MSBuildThisFileDirectory)src/test/dir.proj" Condition="'$(SkipTests)' != 'true'"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="BuildTraversalBuildDependencies"
|
||||
DependsOnTargets="$(TraversalBuildDependencies)" />
|
||||
|
||||
<Target Name="BuildCustomTasks">
|
||||
<MSBuild Projects="tools-local/Microsoft.DotNet.Build.Tasks.Local/Microsoft.DotNet.Build.Tasks.Local.builds" />
|
||||
<MSBuild Projects="tools-local/tasks/core-setup.tasks.builds" />
|
||||
|
||||
<ItemGroup>
|
||||
<CustomTaskDependencies Include="$(BuildToolsTaskDir)Newtonsoft.Json.dll" />
|
||||
<CustomTaskDependencies Include="$(BuildToolsTaskDir)Microsoft.DotNet.PlatformAbstractions.dll" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(CustomTaskDependencies)"
|
||||
DestinationFolder="$(LocalBuildToolsTaskDir)"
|
||||
OverwriteReadOnlyFiles="true"
|
||||
SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BatchRestorePackages" Condition="'$(RestoreDuringBuild)'=='true'">
|
||||
<Message Importance="High" Text="Restoring all packages..." />
|
||||
|
||||
<Exec Command="$(DnuRestoreCommand) %(DnuRestoreDirs.AdditionalArgs) %(DnuRestoreDirs.Identity)" StandardOutputImportance="Low" CustomErrorRegularExpression="^Unable to locate .*" />
|
||||
|
||||
<ItemGroup>
|
||||
<_allPackagesConfigs Include="$(MSBuildProjectDirectory)\src\**\packages.config"/>
|
||||
</ItemGroup>
|
||||
<Exec Condition="'@(_allPackagesConfigs)' != ''" Command="$(NugetRestoreCommand) "%(_allPackagesConfigs.FullPath)"" StandardOutputImportance="Low" />
|
||||
</Target>
|
||||
|
||||
<!-- Task from buildtools that uses lockfiles to validate that packages restored are exactly what were specified. -->
|
||||
<UsingTask TaskName="ValidateExactRestore" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
|
||||
|
||||
<Target Name="ValidateExactRestore"
|
||||
Condition="'$(AllowInexactRestore)'!='true'">
|
||||
<ValidateExactRestore ProjectLockJsons="@(ProjectJsonFiles->'%(RootDir)%(Directory)%(Filename).lock.json')" />
|
||||
</Target>
|
||||
|
||||
<Import Project="dir.targets" />
|
||||
<Import Project="dir.traversal.targets" />
|
||||
<Import Project="$(ToolsDir)clean.targets" />
|
||||
|
||||
<!-- Override RestorePackages from dir.traversal.targets and do a batch restore -->
|
||||
<Target Name="RestorePackages" DependsOnTargets="BatchRestorePackages" />
|
||||
|
||||
<!-- Override clean from dir.traversal.targets and just remove the full BinDir -->
|
||||
<Target Name="CleanAllProjects">
|
||||
<RemoveDir Directories="$(BinDir)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
223
build.sh
223
build.sh
|
@ -8,6 +8,46 @@
|
|||
|
||||
set -e
|
||||
|
||||
initHostDistroRid()
|
||||
{
|
||||
if [ "$__HostOS" == "Linux" ]; then
|
||||
if [ ! -e /etc/os-release ]; then
|
||||
echo "WARNING: Can not determine runtime id for current distro."
|
||||
__HostDistroRid=""
|
||||
else
|
||||
source /etc/os-release
|
||||
__HostDistroRid="$ID.$VERSION_ID-$__HostArch"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
initTargetDistroRid()
|
||||
{
|
||||
if [ $__CrossBuild == 1 ]; then
|
||||
if [ "$__BuildOS" == "Linux" ]; then
|
||||
if [ ! -e $ROOTFS_DIR/etc/os-release ]; then
|
||||
echo "WARNING: Can not determine runtime id for current distro."
|
||||
export __DistroRid=""
|
||||
else
|
||||
source $ROOTFS_DIR/etc/os-release
|
||||
export __DistroRid="$ID.$VERSION_ID-$__BuildArch"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
export __DistroRid="$__HostDistroRid"
|
||||
fi
|
||||
|
||||
# Portable builds target the base RID
|
||||
if [ $__PortableBuild == 1 ]; then
|
||||
if [ "$__BuildOS" == "Linux" ]; then
|
||||
export __DistroRid="linux-$__BuildArch"
|
||||
elif [ "$__BuildOS" == "OSX" ]; then
|
||||
export __DistroRid="osx-$__BuildArch"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
@ -18,40 +58,181 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
|||
|
||||
# Some things depend on HOME and it may not be set. We should fix those things, but until then, we just patch a value in
|
||||
if [ -z "$HOME" ] || [ ! -d "$HOME" ]; then
|
||||
export HOME=$DIR/artifacts/home
|
||||
export HOME=$DIR/Bin/home
|
||||
|
||||
[ ! -d "$HOME" ] || rm -Rf $HOME
|
||||
mkdir -p $HOME
|
||||
fi
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
|
||||
# Use uname to determine what the CPU is.
|
||||
|
||||
CPUName=$(uname -p)
|
||||
|
||||
# Some Linux platforms report unknown for platform, but the arch for machine.
|
||||
|
||||
if [ "$CPUName" == "unknown" ]; then
|
||||
|
||||
CPUName=$(uname -m)
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
case $CPUName in
|
||||
i686)
|
||||
echo "Unsupported CPU $CPUName detected, build might not succeed!"
|
||||
__BuildArch=x86
|
||||
__HostArch=x86
|
||||
;;
|
||||
|
||||
x86_64)
|
||||
__BuildArch=x64
|
||||
__HostArch=x64
|
||||
;;
|
||||
|
||||
armv7l)
|
||||
echo "Unsupported CPU $CPUName detected, build might not succeed!"
|
||||
__BuildArch=arm
|
||||
__HostArch=arm
|
||||
;;
|
||||
|
||||
aarch64)
|
||||
__BuildArch=arm64
|
||||
__HostArch=arm64
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown CPU $CPUName detected, configuring as if for x64"
|
||||
__BuildArch=x64
|
||||
__HostArch=x64
|
||||
;;
|
||||
esac
|
||||
|
||||
# Use uname to determine what the OS is.
|
||||
OSName=$(uname -s)
|
||||
case $OSName in
|
||||
Linux)
|
||||
__BuildOS=Linux
|
||||
__HostOS=Linux
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
__BuildOS=OSX
|
||||
__HostOS=OSX
|
||||
;;
|
||||
|
||||
FreeBSD)
|
||||
__BuildOS=FreeBSD
|
||||
__HostOS=FreeBSD
|
||||
;;
|
||||
|
||||
OpenBSD)
|
||||
__BuildOS=OpenBSD
|
||||
__HostOS=OpenBSD
|
||||
;;
|
||||
|
||||
NetBSD)
|
||||
__BuildOS=NetBSD
|
||||
__HostOS=NetBSD
|
||||
;;
|
||||
|
||||
SunOS)
|
||||
__BuildOS=SunOS
|
||||
__HostOS=SunOS
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unsupported OS $OSName detected, configuring as if for Linux"
|
||||
__BuildOS=Linux
|
||||
__HostOS=Linux
|
||||
;;
|
||||
esac
|
||||
|
||||
__BuildType=Debug
|
||||
__BuildArch=x64
|
||||
__IncludeTests=Include_Tests
|
||||
__VerboseBuild=0
|
||||
__CrossBuild=0
|
||||
__PortableBuild=0
|
||||
|
||||
while :; do
|
||||
if [ $# -le 0 ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
--docker)
|
||||
export BUILD_IN_DOCKER=1
|
||||
export DOCKER_IMAGENAME=$2
|
||||
shift
|
||||
-\?|-h|--help)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
args+=( $1 )
|
||||
|
||||
x86)
|
||||
__BuildArch=x86
|
||||
;;
|
||||
|
||||
x64)
|
||||
__BuildArch=x64
|
||||
;;
|
||||
|
||||
arm)
|
||||
__BuildArch=arm
|
||||
;;
|
||||
|
||||
armel)
|
||||
__BuildArch=armel
|
||||
;;
|
||||
|
||||
arm64)
|
||||
__BuildArch=arm64
|
||||
;;
|
||||
|
||||
debug)
|
||||
__BuildType=Debug
|
||||
;;
|
||||
|
||||
release)
|
||||
__BuildType=Release
|
||||
;;
|
||||
|
||||
cross)
|
||||
__CrossBuild=1
|
||||
;;
|
||||
|
||||
-portable)
|
||||
__PortableBuild=1
|
||||
;;
|
||||
|
||||
verbose)
|
||||
__VerboseBuild=1
|
||||
;;
|
||||
|
||||
skiptests)
|
||||
__IncludeTests=
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
# $args array may have empty elements in it.
|
||||
# The easiest way to remove them is to cast to string and back to array.
|
||||
temp="${args[@]}"
|
||||
args=($temp)
|
||||
# init the host distro name
|
||||
initHostDistroRid
|
||||
|
||||
dockerbuild()
|
||||
{
|
||||
BUILD_COMMAND=/opt/code/build_projects/dotnet-host-build/build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@"
|
||||
}
|
||||
# init the target distro name
|
||||
initTargetDistroRid
|
||||
|
||||
# Check if we need to build in docker
|
||||
if [ ! -z "$BUILD_IN_DOCKER" ]; then
|
||||
dockerbuild "${args[@]}"
|
||||
else
|
||||
$DIR/build_projects/dotnet-host-build/build.sh "${args[@]}"
|
||||
__RunArgs="-TargetArchitecture=$__BuildArch -ConfigurationGroup=$__BuildType -OSGroup=$__HostOS -DistroRid=$__DistroRid"
|
||||
|
||||
if [ $__PortableBuild == 1 ]; then
|
||||
__RunArgs="$__RunArgs -PortableBuild=True"
|
||||
fi
|
||||
|
||||
# Configure environment if we are doing a verbose build
|
||||
if [ $__VerboseBuild == 1 ]; then
|
||||
export VERBOSE=1
|
||||
__RunArgs="$__RunArgs -verbose"
|
||||
fi
|
||||
|
||||
echo "$__RunArgs"
|
||||
$DIR/run.sh build $__RunArgs
|
|
@ -1,544 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
using static Microsoft.DotNet.Cli.Build.FS;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class CompileTargets
|
||||
{
|
||||
public static readonly bool IsWinx86 = CurrentPlatform.IsWindows && CurrentArchitecture.Isx86;
|
||||
public const string SharedFrameworkName = "Microsoft.NETCore.App";
|
||||
|
||||
public static readonly Dictionary<string, string> HostPackageSupportedRids = new Dictionary<string, string>()
|
||||
{
|
||||
// Key: Current platform RID. Value: The actual publishable (non-dummy) package name produced by the build system for this RID.
|
||||
{ "win7-x64", "win7-x64" },
|
||||
{ "win7-x86", "win7-x86" },
|
||||
{ "win8-arm", "win8-arm" },
|
||||
{ "win10-arm64", "win10-arm64" },
|
||||
{ "win-x86", "win-x86" },
|
||||
{ "win-x64", "win-x64" },
|
||||
{ "win-arm", "win-arm" },
|
||||
{ "win-arm64", "win-arm64" },
|
||||
{ "osx.10.12-x64", "osx.10.12-x64" },
|
||||
{ "osx-x64", "osx-x64"},
|
||||
{ "linux-x64", "linux-x64" },
|
||||
{ "ubuntu.14.04-x64", "ubuntu.14.04-x64" },
|
||||
{ "ubuntu.16.04-x64", "ubuntu.16.04-x64" },
|
||||
{ "ubuntu.16.10-x64", "ubuntu.16.10-x64" },
|
||||
{ "ubuntu.14.04-arm", "ubuntu.14.04-arm" },
|
||||
{ "ubuntu.16.04-arm", "ubuntu.16.04-arm" },
|
||||
{ "linux-arm", "linux-arm" },
|
||||
// { "ubuntu.14.04-arm64", "ubuntu.14.04-arm64" },
|
||||
// { "ubuntu.16.04-arm64", "ubuntu.16.04-arm64" },
|
||||
// { "linux-arm64", "linux-arm64" },
|
||||
{ "centos.7-x64", "rhel.7-x64" },
|
||||
{ "rhel.7-x64", "rhel.7-x64" },
|
||||
{ "rhel.7.0-x64", "rhel.7-x64" },
|
||||
{ "rhel.7.1-x64", "rhel.7-x64" },
|
||||
{ "rhel.7.2-x64", "rhel.7-x64" },
|
||||
{ "rhel.7.3-x64", "rhel.7-x64" },
|
||||
{ "debian.8-armel", "debian.8-armel" },
|
||||
{ "debian.8-x64", "debian.8-x64" },
|
||||
{ "fedora.24-x64", "fedora.24-x64" },
|
||||
{ "opensuse.42.1-x64", "opensuse.42.1-x64" },
|
||||
{ "tizen.4.0.0-armel", "tizen.4.0.0-armel" }
|
||||
};
|
||||
|
||||
[Target(nameof(PrepareTargets.Init),
|
||||
nameof(CompileCoreHost),
|
||||
nameof(PackagePkgProjects),
|
||||
nameof(BuildProjectsForNuGetPackages),
|
||||
nameof(PublishSharedFrameworkAndSharedHost))]
|
||||
public static BuildTargetResult Compile(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static void GetVersionResourceForAssembly(
|
||||
string assemblyName,
|
||||
HostVersion.VerInfo hostVer,
|
||||
string commitHash,
|
||||
string tempRcDirectory)
|
||||
{
|
||||
var semVer = hostVer.ToString();
|
||||
var majorVersion = hostVer.Major;
|
||||
var minorVersion = hostVer.Minor;
|
||||
var patchVersion = hostVer.Patch;
|
||||
var buildNumberMajor = hostVer.VerRsrcBuildMajor;
|
||||
var buildNumberMinor = hostVer.VerRsrcBuildMinor;
|
||||
var buildDetails = $"{semVer}, {commitHash} built by: {System.Environment.MachineName}, UTC: {DateTime.UtcNow.ToString()}";
|
||||
var rcContent = $@"
|
||||
#include <Windows.h>
|
||||
|
||||
#ifndef VER_COMPANYNAME_STR
|
||||
#define VER_COMPANYNAME_STR ""Microsoft Corporation""
|
||||
#endif
|
||||
#ifndef VER_FILEDESCRIPTION_STR
|
||||
#define VER_FILEDESCRIPTION_STR ""{assemblyName}""
|
||||
#endif
|
||||
#ifndef VER_INTERNALNAME_STR
|
||||
#define VER_INTERNALNAME_STR VER_FILEDESCRIPTION_STR
|
||||
#endif
|
||||
#ifndef VER_ORIGINALFILENAME_STR
|
||||
#define VER_ORIGINALFILENAME_STR VER_FILEDESCRIPTION_STR
|
||||
#endif
|
||||
#ifndef VER_PRODUCTNAME_STR
|
||||
#define VER_PRODUCTNAME_STR ""Microsoft\xae .NET Core Framework"";
|
||||
#endif
|
||||
#undef VER_PRODUCTVERSION
|
||||
#define VER_PRODUCTVERSION {majorVersion},{minorVersion},{patchVersion},{buildNumberMajor}
|
||||
#undef VER_PRODUCTVERSION_STR
|
||||
#define VER_PRODUCTVERSION_STR ""{buildDetails}""
|
||||
#undef VER_FILEVERSION
|
||||
#define VER_FILEVERSION {majorVersion},{minorVersion},{patchVersion},{buildNumberMajor}
|
||||
#undef VER_FILEVERSION_STR
|
||||
#define VER_FILEVERSION_STR ""{majorVersion},{minorVersion},{buildNumberMajor},{buildNumberMinor},{buildDetails}"";
|
||||
#ifndef VER_LEGALCOPYRIGHT_STR
|
||||
#define VER_LEGALCOPYRIGHT_STR ""\xa9 Microsoft Corporation. All rights reserved."";
|
||||
#endif
|
||||
#ifndef VER_DEBUG
|
||||
#ifdef DEBUG
|
||||
#define VER_DEBUG VS_FF_DEBUG
|
||||
#else
|
||||
#define VER_DEBUG 0
|
||||
#endif
|
||||
#endif
|
||||
";
|
||||
var tempRcHdrDir = Path.Combine(tempRcDirectory, assemblyName);
|
||||
Mkdirp(tempRcHdrDir);
|
||||
var tempRcHdrFile = Path.Combine(tempRcHdrDir, "version_info.h");
|
||||
File.WriteAllText(tempRcHdrFile, rcContent);
|
||||
}
|
||||
|
||||
public static string GenerateVersionResource(BuildTargetContext c)
|
||||
{
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var tempRcDirectory = Path.Combine(Dirs.Intermediate, "hostResourceFiles");
|
||||
Rmdir(tempRcDirectory);
|
||||
Mkdirp(tempRcDirectory);
|
||||
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var commitHash = c.BuildContext.Get<string>("CommitHash");
|
||||
foreach (var binary in hostVersion.LatestHostBinaries)
|
||||
{
|
||||
GetVersionResourceForAssembly(binary.Key, binary.Value, commitHash, tempRcDirectory);
|
||||
}
|
||||
|
||||
return tempRcDirectory;
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CompileCoreHost(BuildTargetContext c)
|
||||
{
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var configuration = c.BuildContext.Get<string>("Configuration");
|
||||
string platform = c.BuildContext.Get<string>("Platform");
|
||||
string crossEnv = c.BuildContext.Get<string>("Cross");
|
||||
bool linkPortable = c.BuildContext.Get<bool>("LinkPortable");
|
||||
|
||||
// Generate build files
|
||||
var cmakeOut = Path.Combine(Dirs.CorehostLatest, "cmake");
|
||||
|
||||
Rmdir(cmakeOut);
|
||||
Mkdirp(cmakeOut);
|
||||
|
||||
// Run the build
|
||||
string corehostSrcDir = Path.Combine(c.BuildContext.BuildDirectory, "src", "corehost");
|
||||
string commitHash = c.BuildContext.Get<string>("CommitHash");
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
// Create .rc files on Windows.
|
||||
var resourceDir = GenerateVersionResource(c);
|
||||
|
||||
if (configuration.Equals("Release"))
|
||||
{
|
||||
// Cmake calls it "RelWithDebInfo" in the generated MSBuild
|
||||
configuration = "RelWithDebInfo";
|
||||
}
|
||||
|
||||
// Why does Windows directly call cmake but Linux/Mac calls "build.sh" in the corehost dir?
|
||||
// See the comment in "src/corehost/build.sh" for details. It doesn't work for some reason.
|
||||
List<string> cmakeArgList = new List<string>();
|
||||
|
||||
string cmakeBaseRid, visualStudio, archMacro, arch;
|
||||
string cmakeHostVer = $"-DCLI_CMAKE_HOST_VER:STRING={hostVersion.LatestHostVersion.ToString()}";
|
||||
string cmakeAppHostVer = $"-DCLI_CMAKE_APPHOST_VER:STRING={hostVersion.LatestAppHostVersion.ToString()}";
|
||||
string cmakeHostPolicyVer = $"-DCLI_CMAKE_HOST_POLICY_VER:STRING={hostVersion.LatestHostPolicyVersion.ToString()}";
|
||||
string cmakeHostFxrVer = $"-DCLI_CMAKE_HOST_FXR_VER:STRING={hostVersion.LatestHostFxrVersion.ToString()}";
|
||||
string cmakeCommitHash = $"-DCLI_CMAKE_COMMIT_HASH:STRING={commitHash}";
|
||||
string cmakeResourceDir = $"-DCLI_CMAKE_RESOURCE_DIR:STRING={resourceDir}";
|
||||
|
||||
switch (platform.ToLower())
|
||||
{
|
||||
case "x86":
|
||||
cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win7-x86";
|
||||
visualStudio = "Visual Studio 14 2015";
|
||||
archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_I386=1";
|
||||
arch = "x86";
|
||||
break;
|
||||
case "arm":
|
||||
cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win8-arm";
|
||||
visualStudio = "Visual Studio 14 2015 ARM";
|
||||
archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_ARM=1";
|
||||
cmakeArgList.Add("-DCMAKE_SYSTEM_VERSION=10.0");
|
||||
arch = "arm";
|
||||
break;
|
||||
case "arm64":
|
||||
cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win10-arm64";
|
||||
visualStudio = "Visual Studio 14 2015 Win64";
|
||||
archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_ARM64=1";
|
||||
arch = "arm64";
|
||||
if (Environment.GetEnvironmentVariable("__ToolsetDir") == null)
|
||||
{
|
||||
throw new Exception("Toolset Dir must be set when the Platform is ARM64");
|
||||
}
|
||||
break;
|
||||
case "x64":
|
||||
cmakeBaseRid = "-DCLI_CMAKE_PKG_RID:STRING=win7-x64";
|
||||
visualStudio = "Visual Studio 14 2015 Win64";
|
||||
archMacro = "-DCLI_CMAKE_PLATFORM_ARCH_AMD64=1";
|
||||
arch = "x64";
|
||||
break;
|
||||
default:
|
||||
throw new PlatformNotSupportedException("Target Architecture: " + platform + " is not currently supported.");
|
||||
}
|
||||
|
||||
cmakeArgList.Add(corehostSrcDir);
|
||||
cmakeArgList.Add(archMacro);
|
||||
cmakeArgList.Add(cmakeHostVer);
|
||||
cmakeArgList.Add(cmakeAppHostVer);
|
||||
cmakeArgList.Add(cmakeHostFxrVer);
|
||||
cmakeArgList.Add(cmakeHostPolicyVer);
|
||||
cmakeArgList.Add(cmakeBaseRid);
|
||||
cmakeArgList.Add(cmakeCommitHash);
|
||||
cmakeArgList.Add(cmakeResourceDir);
|
||||
cmakeArgList.Add("-G");
|
||||
cmakeArgList.Add(visualStudio);
|
||||
|
||||
if (linkPortable)
|
||||
{
|
||||
cmakeArgList.Add("-DCLI_CMAKE_PORTABLE_BUILD=1");
|
||||
}
|
||||
|
||||
ExecIn(cmakeOut, "cmake", cmakeArgList);
|
||||
|
||||
var pf32 = RuntimeInformation.OSArchitecture == Architecture.X64 ?
|
||||
Environment.GetEnvironmentVariable("ProgramFiles(x86)") :
|
||||
Environment.GetEnvironmentVariable("ProgramFiles");
|
||||
|
||||
string msbuildPath = Path.Combine(pf32, "MSBuild", "14.0", "Bin", "MSBuild.exe");
|
||||
string cmakeOutPath = Path.Combine(cmakeOut, "ALL_BUILD.vcxproj");
|
||||
string configParameter = $"/p:Configuration={configuration}";
|
||||
if (arch == "arm64")
|
||||
Exec(msbuildPath, cmakeOutPath, configParameter, "/p:useEnv=true");
|
||||
else
|
||||
Exec(msbuildPath, cmakeOutPath, configParameter);
|
||||
|
||||
// Copy the output out
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "dotnet", configuration, "dotnet.exe"), Path.Combine(Dirs.CorehostLatest, "dotnet.exe"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "dotnet", configuration, "dotnet.pdb"), Path.Combine(Dirs.CorehostLatest, "dotnet.pdb"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "apphost", configuration, "apphost.exe"), Path.Combine(Dirs.CorehostLatest, "apphost.exe"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "apphost", configuration, "apphost.pdb"), Path.Combine(Dirs.CorehostLatest, "apphost.pdb"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.dll"), Path.Combine(Dirs.CorehostLatest, "hostpolicy.dll"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "dll", configuration, "hostpolicy.pdb"), Path.Combine(Dirs.CorehostLatest, "hostpolicy.pdb"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", configuration, "hostfxr.dll"), Path.Combine(Dirs.CorehostLatest, "hostfxr.dll"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", configuration, "hostfxr.pdb"), Path.Combine(Dirs.CorehostLatest, "hostfxr.pdb"), overwrite: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
string arch;
|
||||
switch (platform.ToLower())
|
||||
{
|
||||
case "x64":
|
||||
arch = "x64";
|
||||
break;
|
||||
case "arm":
|
||||
arch = "arm";
|
||||
break;
|
||||
case "armel":
|
||||
arch = "armel";
|
||||
break;
|
||||
case "arm64":
|
||||
arch = "arm64";
|
||||
break;
|
||||
default:
|
||||
throw new PlatformNotSupportedException("Target Architecture: " + platform + " is not currently supported.");
|
||||
}
|
||||
|
||||
// Why does Windows directly call cmake but Linux/Mac calls "build.sh" in the corehost dir?
|
||||
// See the comment in "src/corehost/build.sh" for details. It doesn't work for some reason.
|
||||
List<string> buildScriptArgList = new List<string>();
|
||||
string buildScriptFile = Path.Combine(corehostSrcDir, "build.sh");
|
||||
|
||||
buildScriptArgList.Add("--configuration");
|
||||
buildScriptArgList.Add(configuration);
|
||||
buildScriptArgList.Add("--arch");
|
||||
buildScriptArgList.Add(arch);
|
||||
buildScriptArgList.Add("--hostver");
|
||||
buildScriptArgList.Add(hostVersion.LatestHostVersion.ToString());
|
||||
buildScriptArgList.Add("--apphostver");
|
||||
buildScriptArgList.Add(hostVersion.LatestAppHostVersion.ToString());
|
||||
buildScriptArgList.Add("--fxrver");
|
||||
buildScriptArgList.Add(hostVersion.LatestHostFxrVersion.ToString());
|
||||
buildScriptArgList.Add("--policyver");
|
||||
buildScriptArgList.Add(hostVersion.LatestHostPolicyVersion.ToString());
|
||||
buildScriptArgList.Add("--commithash");
|
||||
buildScriptArgList.Add(commitHash);
|
||||
|
||||
if (string.Equals(crossEnv, "1"))
|
||||
{
|
||||
buildScriptArgList.Add("--cross");
|
||||
}
|
||||
|
||||
if (linkPortable)
|
||||
{
|
||||
buildScriptArgList.Add("-portable");
|
||||
}
|
||||
|
||||
ExecIn(cmakeOut, buildScriptFile, buildScriptArgList);
|
||||
|
||||
// Copy the output out
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "dotnet", "dotnet"), Path.Combine(Dirs.CorehostLatest, "dotnet"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "exe", "apphost", "apphost"), Path.Combine(Dirs.CorehostLatest, "apphost"), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "dll", HostArtifactNames.HostPolicyBaseName), Path.Combine(Dirs.CorehostLatest, HostArtifactNames.HostPolicyBaseName), overwrite: true);
|
||||
File.Copy(Path.Combine(cmakeOut, "cli", "fxr", HostArtifactNames.DotnetHostFxrBaseName), Path.Combine(Dirs.CorehostLatest, HostArtifactNames.DotnetHostFxrBaseName), overwrite: true);
|
||||
}
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult BuildProjectsForNuGetPackages(BuildTargetContext c)
|
||||
{
|
||||
var configuration = c.BuildContext.Get<string>("Configuration");
|
||||
|
||||
// build projects for nuget packages
|
||||
var packagingOutputDir = Path.Combine(Dirs.Intermediate, "forPackaging");
|
||||
Mkdirp(packagingOutputDir);
|
||||
|
||||
foreach (var project in PackageTargets.ProjectsToPack)
|
||||
{
|
||||
var pathToProjectRoot = Path.Combine(c.BuildContext.BuildDirectory, "src", project);
|
||||
|
||||
foreach (var framework in FilterToBuildableFrameworks(GetFrameworksFromProjectJson(Path.Combine(pathToProjectRoot, "project.json"))))
|
||||
{
|
||||
// Just build them, we'll pack later
|
||||
var packBuildResult = DotNetCli.Stage0.Build(
|
||||
"--build-base-path",
|
||||
packagingOutputDir,
|
||||
"--configuration",
|
||||
configuration,
|
||||
"--framework",
|
||||
framework,
|
||||
pathToProjectRoot)
|
||||
.Execute();
|
||||
|
||||
packBuildResult.EnsureSuccessful();
|
||||
}
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult GenerateMSbuildPropsFile(BuildTargetContext c)
|
||||
{
|
||||
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
string platform = c.BuildContext.Get<string>("Platform");
|
||||
|
||||
var msbuildProps = new StringBuilder();
|
||||
|
||||
msbuildProps.AppendLine(@"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">");
|
||||
msbuildProps.AppendLine(" <PropertyGroup>");
|
||||
msbuildProps.AppendLine($" <Platform>{platform}</Platform>");
|
||||
msbuildProps.AppendLine($" <DotNetHostBinDir>{Dirs.CorehostLatest}</DotNetHostBinDir>");
|
||||
msbuildProps.AppendLine($" <HostVersion>{hostVersion.LatestHostVersion.WithoutSuffix}</HostVersion>");
|
||||
msbuildProps.AppendLine($" <AppHostVersion>{hostVersion.LatestAppHostVersion.WithoutSuffix}</AppHostVersion>");
|
||||
msbuildProps.AppendLine($" <HostResolverVersion>{hostVersion.LatestHostFxrVersion.WithoutSuffix}</HostResolverVersion>");
|
||||
msbuildProps.AppendLine($" <HostPolicyVersion>{hostVersion.LatestHostPolicyVersion.WithoutSuffix}</HostPolicyVersion>");
|
||||
msbuildProps.AppendLine($" <BuildNumberMajor>{hostVersion.LatestHostBuildMajor}</BuildNumberMajor>");
|
||||
msbuildProps.AppendLine($" <BuildNumberMinor>{hostVersion.LatestHostBuildMinor}</BuildNumberMinor>");
|
||||
msbuildProps.AppendLine($" <PreReleaseLabel>{hostVersion.ReleaseSuffix}</PreReleaseLabel>");
|
||||
msbuildProps.AppendLine($" <EnsureStableVersion>{hostVersion.EnsureStableVersion}</EnsureStableVersion>");
|
||||
msbuildProps.AppendLine($" <NetCoreAppVersion>{buildVersion.ProductionVersion}</NetCoreAppVersion>");
|
||||
msbuildProps.AppendLine(" </PropertyGroup>");
|
||||
msbuildProps.AppendLine("</Project>");
|
||||
|
||||
File.WriteAllText(Path.Combine(c.BuildContext.BuildDirectory, "pkg", "version.props"), msbuildProps.ToString());
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(GenerateMSbuildPropsFile))]
|
||||
public static BuildTargetResult PackagePkgProjects(BuildTargetContext c)
|
||||
{
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var hostNugetversion = hostVersion.LatestHostVersion.ToString();
|
||||
var content = $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{hostNugetversion}{Environment.NewLine}";
|
||||
var pkgDir = Path.Combine(c.BuildContext.BuildDirectory, "pkg");
|
||||
string rid = HostPackageSupportedRids[c.BuildContext.Get<string>("TargetRID")];
|
||||
File.WriteAllText(Path.Combine(pkgDir, "version.txt"), content);
|
||||
|
||||
// Form the path to the script that generates nuget packages.
|
||||
string buildScriptFile = Path.Combine(pkgDir, "pack.sh");
|
||||
List<string> buildScriptArgList = new List<string>();
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
buildScriptFile = Path.Combine(pkgDir, "pack.cmd");
|
||||
}
|
||||
else
|
||||
{
|
||||
buildScriptArgList.Add("--rid");
|
||||
buildScriptArgList.Add(rid);
|
||||
}
|
||||
|
||||
bool linkPortable = c.BuildContext.Get<bool>("LinkPortable");
|
||||
if (linkPortable)
|
||||
{
|
||||
buildScriptArgList.Add("-portable");
|
||||
}
|
||||
|
||||
Exec(buildScriptFile, buildScriptArgList);
|
||||
|
||||
foreach (var file in Directory.GetFiles(Path.Combine(pkgDir, "bin", "packages"), "*.nupkg"))
|
||||
{
|
||||
var fileName = Path.GetFileName(file);
|
||||
File.Copy(file, Path.Combine(Dirs.CorehostLocalPackages, fileName), true);
|
||||
|
||||
Console.WriteLine($"Copying package {fileName} to artifacts directory {Dirs.CorehostLocalPackages}.");
|
||||
}
|
||||
|
||||
foreach (var item in hostVersion.LatestHostPackagesToValidate)
|
||||
{
|
||||
var fileFilter = $"runtime.{rid}.{item.Key}.{item.Value.ToString()}.nupkg";
|
||||
if (Directory.GetFiles(Dirs.CorehostLocalPackages, fileFilter).Length == 0)
|
||||
{
|
||||
throw new BuildFailureException($"Nupkg for {fileFilter} was not created.");
|
||||
}
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PrepareTargets.Init))]
|
||||
public static BuildTargetResult RestoreLockedCoreHost(BuildTargetContext c)
|
||||
{
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var lockedHostFxrVersion = hostVersion.LockedHostFxrVersion.ToString();
|
||||
var lockedHostVersion = hostVersion.LockedHostVersion.ToString();
|
||||
string currentRid = HostPackageSupportedRids[c.BuildContext.Get<string>("TargetRID")];
|
||||
string framework = c.BuildContext.Get<string>("TargetFramework");
|
||||
|
||||
string projectJson = $@"{{
|
||||
""dependencies"": {{
|
||||
""Microsoft.NETCore.DotNetHostResolver"" : ""{lockedHostFxrVersion}"",
|
||||
""Microsoft.NETCore.DotNetHost"" : ""{lockedHostVersion}"",
|
||||
}},
|
||||
""frameworks"": {{
|
||||
""{framework}"": {{}}
|
||||
}},
|
||||
""runtimes"": {{
|
||||
""{currentRid}"": {{}}
|
||||
}}
|
||||
}}";
|
||||
var tempPjDirectory = Path.Combine(Dirs.Intermediate, "lockedHostTemp");
|
||||
FS.Rmdir(tempPjDirectory);
|
||||
Directory.CreateDirectory(tempPjDirectory);
|
||||
var tempPjFile = Path.Combine(tempPjDirectory, "project.json");
|
||||
File.WriteAllText(tempPjFile, projectJson);
|
||||
|
||||
DotNetCli.Stage0.Restore("--verbosity", "verbose",
|
||||
"--fallbacksource", Dirs.CorehostLocalPackages)
|
||||
.WorkingDirectory(tempPjDirectory)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
// Clean out before publishing locked binaries
|
||||
FS.Rmdir(Dirs.CorehostLocked);
|
||||
|
||||
// Use specific RIDS for non-backward compatible platforms.
|
||||
DotNetCli.Stage0.Publish("--output", Dirs.CorehostLocked, "--no-build", "-r", currentRid)
|
||||
.WorkingDirectory(tempPjDirectory)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(RestoreLockedCoreHost))]
|
||||
public static BuildTargetResult PublishSharedFrameworkAndSharedHost(BuildTargetContext c)
|
||||
{
|
||||
var outputDir = Dirs.SharedFrameworkPublish;
|
||||
Utils.DeleteDirectory(outputDir);
|
||||
Directory.CreateDirectory(outputDir);
|
||||
|
||||
var dotnetCli = DotNetCli.Stage0;
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
string sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
string sharedFrameworkRid = c.BuildContext.Get<string>("TargetRID");
|
||||
string sharedFrameworkTarget = c.BuildContext.Get<string>("TargetFramework");
|
||||
var hostFxrVersion = hostVersion.LockedHostFxrVersion.ToString();
|
||||
var commitHash = c.BuildContext.Get<string>("CommitHash");
|
||||
|
||||
var sharedFrameworkPublisher = new SharedFrameworkPublisher(
|
||||
Dirs.RepoRoot,
|
||||
Dirs.CorehostLocked,
|
||||
Dirs.CorehostLatest,
|
||||
Dirs.CorehostLocalPackages,
|
||||
sharedFrameworkNugetVersion,
|
||||
sharedFrameworkRid,
|
||||
sharedFrameworkTarget);
|
||||
|
||||
sharedFrameworkPublisher.PublishSharedFramework(outputDir, commitHash, dotnetCli, hostFxrVersion);
|
||||
|
||||
sharedFrameworkPublisher.CopyMuxer(outputDir);
|
||||
sharedFrameworkPublisher.CopyHostFxrToVersionedDirectory(outputDir, hostFxrVersion);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static IEnumerable<string> FilterToBuildableFrameworks(IEnumerable<string> frameworks)
|
||||
{
|
||||
if (CurrentPlatform.IsWindows)
|
||||
{
|
||||
return frameworks;
|
||||
}
|
||||
|
||||
// On non windows platforms, we can not depend on reference assemblies for net4X projects being around, just build netstandard and netcoreapp configurations.
|
||||
return frameworks.Where(f => f.StartsWith("netstandard", StringComparison.Ordinal) || f.StartsWith("netcoreapp", StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
private static IEnumerable<string> GetFrameworksFromProjectJson(string projectJsonPath)
|
||||
{
|
||||
using (TextReader projectFileReader = File.OpenText(projectJsonPath))
|
||||
{
|
||||
var projectJsonReader = new JsonTextReader(projectFileReader);
|
||||
var serializer = new JsonSerializer();
|
||||
var project = serializer.Deserialize<JObject>(projectJsonReader);
|
||||
|
||||
var frameworksSection = project.Value<JObject>("frameworks");
|
||||
foreach (var framework in frameworksSection.Properties())
|
||||
{
|
||||
yield return framework.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,276 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class DebTargets
|
||||
{
|
||||
[Target(nameof(GenerateSharedHostDeb),
|
||||
nameof(GenerateHostFxrDeb),
|
||||
nameof(GenerateSharedFrameworkDeb))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
[BuildArchitectures(BuildArchitecture.x64)]
|
||||
public static BuildTargetResult GenerateDebs(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
public static BuildTargetResult GenerateSharedHostDeb(BuildTargetContext c)
|
||||
{
|
||||
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||
// So we need to skip this target if the tools aren't present.
|
||||
// https://github.com/dotnet/core-setup/issues/167
|
||||
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
|
||||
{
|
||||
c.Info("Debuild not present, skipping target: {nameof(GenerateSharedHostDeb)}");
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
var packageName = Monikers.GetDebianSharedHostPackageName(c);
|
||||
var version = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
|
||||
var inputRoot = c.BuildContext.Get<string>("SharedHostPublishRoot");
|
||||
var debFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
|
||||
var debianConfigFile = Path.Combine(Dirs.DebPackagingConfig, "dotnet-sharedhost-debian_config.json");
|
||||
|
||||
var debianConfigVariables = new Dictionary<string, string>()
|
||||
{
|
||||
{ "SHARED_HOST_BRAND_NAME", Monikers.GetSharedHostBrandName(c) }
|
||||
};
|
||||
|
||||
var debCreator = new DebPackageCreator(
|
||||
DotNetCli.Stage0,
|
||||
Dirs.Intermediate,
|
||||
dotnetDebToolPackageSource: Dirs.Packages);
|
||||
|
||||
debCreator.CreateDeb(
|
||||
debianConfigFile,
|
||||
packageName,
|
||||
version,
|
||||
inputRoot,
|
||||
debianConfigVariables,
|
||||
debFile,
|
||||
manPagesDir);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
public static BuildTargetResult GenerateHostFxrDeb(BuildTargetContext c)
|
||||
{
|
||||
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||
// So we need to skip this target if the tools aren't present.
|
||||
// https://github.com/dotnet/core-setup/issues/167
|
||||
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
|
||||
{
|
||||
c.Info("Debuild not present, skipping target: {nameof(GenerateHostFxrDeb)}");
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
var hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
|
||||
var packageName = Monikers.GetDebianHostFxrPackageName(hostFxrVersion);
|
||||
var sharedHostVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
|
||||
var inputRoot = c.BuildContext.Get<string>("HostFxrPublishRoot");
|
||||
var debFile = c.BuildContext.Get<string>("HostFxrInstallerFile");
|
||||
var debianConfigFile = Path.Combine(Dirs.DebPackagingConfig, "dotnet-hostfxr-debian_config.json");
|
||||
|
||||
var debianConfigVariables = new Dictionary<string, string>()
|
||||
{
|
||||
{ "HOSTFXR_BRAND_NAME", Monikers.GetHostFxrBrandName(c) },
|
||||
{ "SHARED_HOST_DEBIAN_VERSION", sharedHostVersion },
|
||||
{ "HOSTFXR_NUGET_VERSION", hostFxrVersion },
|
||||
{ "HOSTFXR_DEBIAN_PACKAGE_NAME", packageName }
|
||||
};
|
||||
|
||||
var debCreator = new DebPackageCreator(
|
||||
DotNetCli.Stage0,
|
||||
Dirs.Intermediate,
|
||||
dotnetDebToolPackageSource: Dirs.Packages);
|
||||
|
||||
debCreator.CreateDeb(
|
||||
debianConfigFile,
|
||||
packageName,
|
||||
hostFxrVersion,
|
||||
inputRoot,
|
||||
debianConfigVariables,
|
||||
debFile);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(InstallSharedHost))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
public static BuildTargetResult GenerateSharedFrameworkDeb(BuildTargetContext c)
|
||||
{
|
||||
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||
// So we need to skip this target if the tools aren't present.
|
||||
// https://github.com/dotnet/core-setup/issues/167
|
||||
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
|
||||
{
|
||||
c.Info("Debuild not present, skipping target: {nameof(GenerateSharedFrameworkDeb)}");
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
var sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var packageName = Monikers.GetDebianSharedFrameworkPackageName(sharedFrameworkNugetVersion);
|
||||
var sharedHostVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
|
||||
var hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
|
||||
var hostfxrDebianPackageName = Monikers.GetDebianHostFxrPackageName(hostFxrVersion);
|
||||
var version = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var inputRoot = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
|
||||
var debFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||
var debianConfigFile = Path.Combine(Dirs.DebPackagingConfig, "dotnet-sharedframework-debian_config.json");
|
||||
|
||||
var debianConfigVariables = new Dictionary<string, string>()
|
||||
{
|
||||
{ "SHARED_HOST_DEBIAN_VERSION", sharedHostVersion },
|
||||
{ "HOSTFXR_DEBIAN_PACKAGE_NAME", hostfxrDebianPackageName},
|
||||
{ "HOSTFXR_DEBIAN_VERSION", hostFxrVersion },
|
||||
{ "SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME", packageName },
|
||||
{ "SHARED_FRAMEWORK_NUGET_NAME", Monikers.SharedFrameworkName },
|
||||
{ "SHARED_FRAMEWORK_NUGET_VERSION", c.BuildContext.Get<string>("SharedFrameworkNugetVersion")},
|
||||
{ "SHARED_FRAMEWORK_BRAND_NAME", Monikers.GetSharedFxBrandName(c) }
|
||||
};
|
||||
|
||||
var debCreator = new DebPackageCreator(
|
||||
DotNetCli.Stage0,
|
||||
Dirs.Intermediate,
|
||||
dotnetDebToolPackageSource: Dirs.Packages);
|
||||
|
||||
debCreator.CreateDeb(
|
||||
debianConfigFile,
|
||||
packageName,
|
||||
version,
|
||||
inputRoot,
|
||||
debianConfigVariables,
|
||||
debFile);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(InstallSharedFramework),
|
||||
nameof(RemovePackages))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
[BuildArchitectures(BuildArchitecture.x64)]
|
||||
public static BuildTargetResult TestDebInstaller(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult InstallSharedHost(BuildTargetContext c)
|
||||
{
|
||||
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||
// So we need to skip this target if the tools aren't present.
|
||||
// https://github.com/dotnet/core-setup/issues/167
|
||||
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
|
||||
{
|
||||
c.Info("Debuild not present, skipping target: {nameof(InstallSharedHost)}");
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
InstallPackage(c.BuildContext.Get<string>("SharedHostInstallerFile"));
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(InstallSharedHost))]
|
||||
public static BuildTargetResult InstallHostFxr(BuildTargetContext c)
|
||||
{
|
||||
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||
// So we need to skip this target if the tools aren't present.
|
||||
// https://github.com/dotnet/core-setup/issues/167
|
||||
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
|
||||
{
|
||||
c.Info("Debuild not present, skipping target: {nameof(InstallHostFxr)}");
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
InstallPackage(c.BuildContext.Get<string>("HostFxrInstallerFile"));
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(InstallHostFxr))]
|
||||
public static BuildTargetResult InstallSharedFramework(BuildTargetContext c)
|
||||
{
|
||||
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||
// So we need to skip this target if the tools aren't present.
|
||||
// https://github.com/dotnet/core-setup/issues/167
|
||||
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
|
||||
{
|
||||
c.Info("Debuild not present, skipping target: {nameof(InstallSharedFramework)}");
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
InstallPackage(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"));
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult RemovePackages(BuildTargetContext c)
|
||||
{
|
||||
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||
// So we need to skip this target if the tools aren't present.
|
||||
// https://github.com/dotnet/core-setup/issues/167
|
||||
if (ShouldSkipBuildDebPackages() || DebuildNotPresent())
|
||||
{
|
||||
c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}");
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
var sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
|
||||
|
||||
IEnumerable<string> orderedPackageNames = new List<string>()
|
||||
{
|
||||
Monikers.GetDebianSharedFrameworkPackageName(sharedFrameworkNugetVersion),
|
||||
Monikers.GetDebianHostFxrPackageName(hostFxrVersion),
|
||||
Monikers.GetDebianSharedHostPackageName(c)
|
||||
};
|
||||
|
||||
foreach(var packageName in orderedPackageNames)
|
||||
{
|
||||
RemovePackage(packageName);
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static void InstallPackage(string packagePath)
|
||||
{
|
||||
Cmd("sudo", "dpkg", "-i", packagePath)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
|
||||
private static void RemovePackage(string packageName)
|
||||
{
|
||||
Cmd("sudo", "dpkg", "-r", packageName)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
|
||||
private static bool DebuildNotPresent()
|
||||
{
|
||||
return Cmd("/usr/bin/env", "debuild", "-h").Execute().ExitCode != 0;
|
||||
}
|
||||
|
||||
private static bool ShouldSkipBuildDebPackages()
|
||||
{
|
||||
return Environment.GetEnvironmentVariable("DOTNET_BUILD_SKIP_DEB_PACKAGING") == "1";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class InstallerTargets
|
||||
{
|
||||
[Target(nameof(MsiTargets.GenerateMsis),
|
||||
nameof(MsiTargets.GenerateBundles),
|
||||
nameof(PkgTargets.GeneratePkgs),
|
||||
nameof(DebTargets.GenerateDebs))]
|
||||
public static BuildTargetResult GenerateInstaller(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(DebTargets.TestDebInstaller))]
|
||||
public static BuildTargetResult TestInstaller(BuildTargetContext c)
|
||||
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,263 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Net.Http;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class MsiTargets
|
||||
{
|
||||
private const string ENGINE = "engine.exe";
|
||||
|
||||
private const string WixVersion = "3.10.2";
|
||||
|
||||
private static string WixRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(Dirs.Output, $"WixTools.{WixVersion}");
|
||||
}
|
||||
}
|
||||
|
||||
private static string HostFxrMsi { get; set; }
|
||||
|
||||
private static string SharedHostMsi { get; set; }
|
||||
|
||||
private static string SharedFrameworkMsi { get; set; }
|
||||
|
||||
private static string SharedFrameworkBundle { get; set; }
|
||||
|
||||
private static string SharedFrameworkEngine { get; set; }
|
||||
|
||||
private static string MsiVersion { get; set; }
|
||||
|
||||
private static string DisplayVersion { get; set; }
|
||||
|
||||
// Processor Architecture of MSI's contents
|
||||
private static string TargetArch { get; set; }
|
||||
|
||||
// Processor Architecture of MSI itself
|
||||
private static string MSIBuildArch { get; set; }
|
||||
|
||||
private static void AcquireWix(BuildTargetContext c)
|
||||
{
|
||||
if (File.Exists(Path.Combine(WixRoot, "candle.exe")))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(WixRoot);
|
||||
|
||||
c.Info("Downloading WixTools..");
|
||||
|
||||
DownloadFile($"https://dotnetcli.blob.core.windows.net/build/wix/wix.{WixVersion}.zip", Path.Combine(WixRoot, "WixTools.zip"));
|
||||
|
||||
c.Info("Extracting WixTools..");
|
||||
ZipFile.ExtractToDirectory(Path.Combine(WixRoot, "WixTools.zip"), WixRoot);
|
||||
}
|
||||
|
||||
private static void DownloadFile(string uri, string destinationPath)
|
||||
{
|
||||
using (var httpClient = new HttpClient())
|
||||
{
|
||||
var getTask = httpClient.GetStreamAsync(uri);
|
||||
|
||||
using (var outStream = File.OpenWrite(destinationPath))
|
||||
{
|
||||
getTask.Result.CopyTo(outStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult InitMsi(BuildTargetContext c)
|
||||
{
|
||||
|
||||
SharedFrameworkBundle = c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkInstallerFile");
|
||||
SharedHostMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedHostInstallerFile"), "msi");
|
||||
HostFxrMsi = Path.ChangeExtension(c.BuildContext.Get<string>("HostFxrInstallerFile"), "msi");
|
||||
SharedFrameworkMsi = Path.ChangeExtension(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"), "msi");
|
||||
SharedFrameworkEngine = GetEngineName(SharedFrameworkBundle);
|
||||
|
||||
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
||||
MsiVersion = buildVersion.GenerateMsiVersion();
|
||||
DisplayVersion = buildVersion.SimpleVersion;
|
||||
|
||||
TargetArch = c.BuildContext.Get<string>("Platform");
|
||||
|
||||
MSIBuildArch = CurrentArchitecture.Current.ToString();
|
||||
|
||||
// If we are building the MSI for Arm32 or Arm64, then build it as x86 or x64 for now.
|
||||
if (String.Compare(TargetArch, "arm", true) == 0)
|
||||
{
|
||||
MSIBuildArch = "x86";
|
||||
}
|
||||
else if (String.Compare(TargetArch, "arm64", true) == 0)
|
||||
{
|
||||
MSIBuildArch = "x64";
|
||||
}
|
||||
|
||||
AcquireWix(c);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi),
|
||||
nameof(GenerateDotnetSharedHostMsi),
|
||||
nameof(GenerateDotnetHostFxrMsi),
|
||||
nameof(GenerateDotnetSharedFrameworkMsi))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateMsis(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi),
|
||||
nameof(GenerateSharedFxBundle))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateBundles(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateDotnetSharedHostMsi(BuildTargetContext c)
|
||||
{
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var hostMsiVersion = hostVersion.LockedHostVersion.GenerateMsiVersion();
|
||||
var hostNugetVersion = hostVersion.LockedHostVersion.ToString();
|
||||
var inputDir = c.BuildContext.Get<string>("SharedHostPublishRoot");
|
||||
var wixObjRoot = Path.Combine(Dirs.Output, "obj", "wix", "sharedhost");
|
||||
var sharedHostBrandName = $"'{Monikers.GetSharedHostBrandName(c)}'";
|
||||
var upgradeCode = Utils.GenerateGuidFromName(SharedHostMsi).ToString().ToUpper();
|
||||
|
||||
if (Directory.Exists(wixObjRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(wixObjRoot);
|
||||
}
|
||||
Directory.CreateDirectory(wixObjRoot);
|
||||
|
||||
Cmd("powershell", "-NoProfile", "-NoLogo",
|
||||
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "host", "generatemsi.ps1"),
|
||||
inputDir, SharedHostMsi, WixRoot, sharedHostBrandName, hostMsiVersion, hostNugetVersion, MSIBuildArch, TargetArch, wixObjRoot, upgradeCode)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateDotnetHostFxrMsi(BuildTargetContext c)
|
||||
{
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion");
|
||||
var hostFxrMsiVersion = hostVersion.LockedHostFxrVersion.GenerateMsiVersion();
|
||||
var hostFxrNugetVersion = hostVersion.LockedHostFxrVersion.ToString();
|
||||
var inputDir = c.BuildContext.Get<string>("HostFxrPublishRoot");
|
||||
var wixObjRoot = Path.Combine(Dirs.Output, "obj", "wix", "hostfxr");
|
||||
var hostFxrBrandName = $"'{Monikers.GetHostFxrBrandName(c)}'";
|
||||
var upgradeCode = Utils.GenerateGuidFromName(HostFxrMsi).ToString().ToUpper();
|
||||
|
||||
if (Directory.Exists(wixObjRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(wixObjRoot);
|
||||
}
|
||||
Directory.CreateDirectory(wixObjRoot);
|
||||
|
||||
Cmd("powershell", "-NoProfile", "-NoLogo",
|
||||
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "hostfxr", "generatemsi.ps1"),
|
||||
inputDir, HostFxrMsi, WixRoot, hostFxrBrandName, hostFxrMsiVersion, hostFxrNugetVersion, MSIBuildArch, TargetArch, wixObjRoot, upgradeCode)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateDotnetSharedFrameworkMsi(BuildTargetContext c)
|
||||
{
|
||||
var inputDir = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
|
||||
var sharedFrameworkNuGetName = Monikers.SharedFrameworkName;
|
||||
var sharedFrameworkNuGetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var msiVerison = sharedFrameworkNuGetVersion.Split('-')[0];
|
||||
var upgradeCode = Utils.GenerateGuidFromName(SharedFrameworkMsi).ToString().ToUpper();
|
||||
var wixObjRoot = Path.Combine(Dirs.Output, "obj", "wix", "sharedframework");
|
||||
var sharedFxBrandName = $"'{Monikers.GetSharedFxBrandName(c)}'";
|
||||
|
||||
if (Directory.Exists(wixObjRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(wixObjRoot);
|
||||
}
|
||||
Directory.CreateDirectory(wixObjRoot);
|
||||
|
||||
Cmd("powershell", "-NoProfile", "-NoLogo",
|
||||
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatemsi.ps1"),
|
||||
inputDir, SharedFrameworkMsi, WixRoot, sharedFxBrandName, msiVerison, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, MSIBuildArch, TargetArch, wixObjRoot)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateSharedFxBundle(BuildTargetContext c)
|
||||
{
|
||||
var sharedFrameworkNuGetName = Monikers.SharedFrameworkName;
|
||||
var sharedFrameworkNuGetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var upgradeCode = Utils.GenerateGuidFromName(SharedFrameworkBundle).ToString().ToUpper();
|
||||
var sharedFxBrandName = $"'{Monikers.GetSharedFxBrandName(c)}'";
|
||||
|
||||
Cmd("powershell", "-NoProfile", "-NoLogo",
|
||||
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "sharedframework", "generatebundle.ps1"),
|
||||
SharedFrameworkMsi, SharedHostMsi, HostFxrMsi, SharedFrameworkBundle, WixRoot, sharedFxBrandName, MsiVersion, DisplayVersion, sharedFrameworkNuGetName, sharedFrameworkNuGetVersion, upgradeCode, TargetArch, MSIBuildArch)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static string GetEngineName(string bundle)
|
||||
{
|
||||
var engine = $"{Path.GetFileNameWithoutExtension(bundle)}-{ENGINE}";
|
||||
return Path.Combine(Path.GetDirectoryName(bundle), engine);
|
||||
}
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult ExtractEngineFromBundle(BuildTargetContext c)
|
||||
{
|
||||
ExtractEngineFromBundleHelper(SharedFrameworkBundle, SharedFrameworkEngine);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(MsiTargets.InitMsi))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult ReattachEngineToBundle(BuildTargetContext c)
|
||||
{
|
||||
ReattachEngineToBundleHelper(SharedFrameworkBundle, SharedFrameworkEngine);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static void ExtractEngineFromBundleHelper(string bundle, string engine)
|
||||
{
|
||||
Cmd($"{WixRoot}\\insignia.exe", "-ib", bundle, "-o", engine)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
|
||||
private static void ReattachEngineToBundleHelper(string bundle, string engine)
|
||||
{
|
||||
Cmd($"{WixRoot}\\insignia.exe", "-ab", engine, bundle, "-o", bundle)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
File.Delete(engine);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using NugetProgram = NuGet.CommandLine.XPlat.Program;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public static class NuGetUtil
|
||||
{
|
||||
[Flags]
|
||||
public enum NuGetIncludePackageType
|
||||
{
|
||||
Standard = 1,
|
||||
Symbols = 2
|
||||
}
|
||||
public static void PushPackages(
|
||||
string packageDirPath,
|
||||
string destinationUrl,
|
||||
string apiKey,
|
||||
NuGetIncludePackageType includePackageTypes)
|
||||
{
|
||||
List<string> paths = new List<string>();
|
||||
if (includePackageTypes.HasFlag(NuGetIncludePackageType.Standard))
|
||||
{
|
||||
paths.AddRange(Directory.GetFiles(packageDirPath, "*.nupkg").Where(p => !p.EndsWith(".symbols.nupkg")));
|
||||
}
|
||||
if (includePackageTypes.HasFlag(NuGetIncludePackageType.Symbols))
|
||||
{
|
||||
paths.AddRange(Directory.GetFiles(packageDirPath, "*.symbols.nupkg"));
|
||||
}
|
||||
|
||||
foreach (var path in paths)
|
||||
{
|
||||
int result = RunNuGetCommand(
|
||||
"push",
|
||||
"-s", destinationUrl,
|
||||
"-k", apiKey,
|
||||
"--timeout", "3600",
|
||||
path);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
throw new BuildFailureException($"NuGet Push failed with exit code '{result}'.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int RunNuGetCommand(params string[] nugetArgs)
|
||||
{
|
||||
var nugetAssembly = typeof(NugetProgram).GetTypeInfo().Assembly;
|
||||
var mainMethod = nugetAssembly.EntryPoint;
|
||||
return (int)mainMethod.Invoke(null, new object[] { nugetArgs });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,270 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.IO.Compression;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public static class PackageTargets
|
||||
{
|
||||
public static readonly string[] ProjectsToPack = new string[]
|
||||
{
|
||||
"Microsoft.DotNet.PlatformAbstractions",
|
||||
"Microsoft.Extensions.DependencyModel",
|
||||
};
|
||||
|
||||
[Target(
|
||||
nameof(PackageTargets.CopySharedHostLayout),
|
||||
nameof(PackageTargets.CopyHostFxrLayout),
|
||||
nameof(PackageTargets.CopySharedFxLayout),
|
||||
nameof(PackageTargets.CopyCombinedMuxerHostFxrFrameworkLayout))]
|
||||
public static BuildTargetResult InitPackage(BuildTargetContext c)
|
||||
{
|
||||
Directory.CreateDirectory(Dirs.Packages);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PrepareTargets.Init),
|
||||
nameof(PackageTargets.InitPackage),
|
||||
nameof(PackageTargets.GenerateVersionBadge),
|
||||
nameof(PackageTargets.GenerateCompressedFile),
|
||||
nameof(InstallerTargets.GenerateInstaller),
|
||||
nameof(PackageTargets.GenerateNugetPackages),
|
||||
nameof(InstallerTargets.TestInstaller))]
|
||||
[Environment("DOTNET_BUILD_SKIP_PACKAGING", null, "0", "false")]
|
||||
public static BuildTargetResult Package(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult GenerateVersionBadge(BuildTargetContext c)
|
||||
{
|
||||
var sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var versionSvg = Path.Combine(Dirs.RepoRoot, "resources", "images", "version_badge.svg");
|
||||
var outputVersionSvg = c.BuildContext.Get<string>("VersionBadge");
|
||||
|
||||
var versionSvgContent = File.ReadAllText(versionSvg);
|
||||
versionSvgContent = versionSvgContent.Replace("ver_number", sharedFrameworkNugetVersion);
|
||||
File.WriteAllText(outputVersionSvg, versionSvgContent);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CopySharedHostLayout(BuildTargetContext c)
|
||||
{
|
||||
var sharedHostRoot = Path.Combine(Dirs.Output, "obj", "sharedHost");
|
||||
if (Directory.Exists(sharedHostRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(sharedHostRoot);
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(sharedHostRoot);
|
||||
|
||||
foreach (var file in Directory.GetFiles(Dirs.SharedFrameworkPublish, "*", SearchOption.TopDirectoryOnly))
|
||||
{
|
||||
var destFile = file.Replace(Dirs.SharedFrameworkPublish, sharedHostRoot);
|
||||
File.Copy(file, destFile, true);
|
||||
c.Warn(destFile);
|
||||
}
|
||||
FixPermissions(sharedHostRoot);
|
||||
|
||||
File.Copy(
|
||||
Path.Combine(Dirs.RepoRoot, "resources", "ThirdPartyNotices.txt"),
|
||||
Path.Combine(sharedHostRoot, "ThirdPartyNotices.txt"));
|
||||
|
||||
File.Copy(
|
||||
Path.Combine(Dirs.RepoRoot, "resources", "LICENSE.txt"),
|
||||
Path.Combine(sharedHostRoot, "LICENSE.txt"));
|
||||
|
||||
c.BuildContext["SharedHostPublishRoot"] = sharedHostRoot;
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CopyHostFxrLayout(BuildTargetContext c)
|
||||
{
|
||||
var hostFxrRoot = Path.Combine(Dirs.Output, "obj", "hostFxr");
|
||||
if (Directory.Exists(hostFxrRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(hostFxrRoot);
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(hostFxrRoot);
|
||||
|
||||
string srcHostDir = Path.Combine(Dirs.SharedFrameworkPublish, "host");
|
||||
string destHostDir = Path.Combine(hostFxrRoot, "host");
|
||||
|
||||
FS.CopyRecursive(srcHostDir, destHostDir);
|
||||
FixPermissions(hostFxrRoot);
|
||||
|
||||
c.BuildContext["HostFxrPublishRoot"] = hostFxrRoot;
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CopySharedFxLayout(BuildTargetContext c)
|
||||
{
|
||||
var sharedFxRoot = Path.Combine(Dirs.Output, "obj", "sharedFx");
|
||||
if (Directory.Exists(sharedFxRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(sharedFxRoot);
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(sharedFxRoot);
|
||||
Utils.CopyDirectoryRecursively(Path.Combine(Dirs.SharedFrameworkPublish, "shared"), sharedFxRoot, true);
|
||||
FixPermissions(sharedFxRoot);
|
||||
|
||||
c.BuildContext["SharedFrameworkPublishRoot"] = sharedFxRoot;
|
||||
c.BuildContext["SharedFrameworkPublishSymbolsRoot"] = $"{Dirs.SharedFrameworkPublish}.symbols";
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CopyCombinedMuxerHostFxrFrameworkLayout(BuildTargetContext c)
|
||||
{
|
||||
var combinedRoot = Path.Combine(Dirs.Output, "obj", "combined-framework-host");
|
||||
if (Directory.Exists(combinedRoot))
|
||||
{
|
||||
Utils.DeleteDirectory(combinedRoot);
|
||||
}
|
||||
Directory.CreateDirectory(combinedRoot);
|
||||
|
||||
string sharedFrameworkPublishRoot = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
|
||||
Utils.CopyDirectoryRecursively(sharedFrameworkPublishRoot, combinedRoot);
|
||||
|
||||
string sharedHostPublishRoot = c.BuildContext.Get<string>("SharedHostPublishRoot");
|
||||
Utils.CopyDirectoryRecursively(sharedHostPublishRoot, combinedRoot);
|
||||
|
||||
string hostFxrPublishRoot = c.BuildContext.Get<string>("HostFxrPublishRoot");
|
||||
Utils.CopyDirectoryRecursively(hostFxrPublishRoot, combinedRoot);
|
||||
|
||||
c.BuildContext["CombinedMuxerHostFxrFrameworkPublishRoot"] = combinedRoot;
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PackageTargets.GenerateZip), nameof(PackageTargets.GenerateTarBall))]
|
||||
public static BuildTargetResult GenerateCompressedFile(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PackageTargets.InitPackage))]
|
||||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateZip(BuildTargetContext c)
|
||||
{
|
||||
CreateZipFromDirectory(
|
||||
c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkPublishRoot"),
|
||||
c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkCompressedFile"));
|
||||
|
||||
CreateZipFromDirectory(
|
||||
c.BuildContext.Get<string>("HostFxrPublishRoot"),
|
||||
c.BuildContext.Get<string>("HostFxrCompressedFile"));
|
||||
|
||||
CreateZipFromDirectory(
|
||||
c.BuildContext.Get<string>("SharedFrameworkPublishRoot"),
|
||||
c.BuildContext.Get<string>("SharedFrameworkCompressedFile"));
|
||||
|
||||
CreateZipFromDirectory(
|
||||
c.BuildContext.Get<string>("SharedFrameworkPublishSymbolsRoot"),
|
||||
c.BuildContext.Get<string>("SharedFrameworkSymbolsCompressedFile"));
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PackageTargets.InitPackage))]
|
||||
[BuildPlatforms(BuildPlatform.Unix)]
|
||||
public static BuildTargetResult GenerateTarBall(BuildTargetContext c)
|
||||
{
|
||||
CreateTarBallFromDirectory(
|
||||
c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkPublishRoot"),
|
||||
c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkCompressedFile"));
|
||||
|
||||
CreateTarBallFromDirectory(
|
||||
c.BuildContext.Get<string>("HostFxrPublishRoot"),
|
||||
c.BuildContext.Get<string>("HostFxrCompressedFile"));
|
||||
|
||||
CreateTarBallFromDirectory(
|
||||
c.BuildContext.Get<string>("SharedFrameworkPublishRoot"),
|
||||
c.BuildContext.Get<string>("SharedFrameworkCompressedFile"));
|
||||
|
||||
CreateTarBallFromDirectory(
|
||||
c.BuildContext.Get<string>("SharedFrameworkPublishSymbolsRoot"),
|
||||
c.BuildContext.Get<string>("SharedFrameworkSymbolsCompressedFile"));
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult GenerateNugetPackages(BuildTargetContext c)
|
||||
{
|
||||
var versionSuffix = c.BuildContext.Get<BuildVersion>("BuildVersion").CommitCountString;
|
||||
var configuration = c.BuildContext.Get<string>("Configuration");
|
||||
|
||||
var dotnet = DotNetCli.Stage0;
|
||||
|
||||
var packagingBuildBasePath = Path.Combine(Dirs.Intermediate, "forPackaging");
|
||||
|
||||
FS.Mkdirp(Dirs.Packages);
|
||||
|
||||
foreach (var projectName in ProjectsToPack)
|
||||
{
|
||||
var projectFile = Path.Combine(Dirs.RepoRoot, "src", projectName, "project.json");
|
||||
|
||||
dotnet.Pack(
|
||||
projectFile,
|
||||
"--no-build",
|
||||
"--serviceable",
|
||||
"--build-base-path", packagingBuildBasePath,
|
||||
"--output", Dirs.Packages,
|
||||
"--configuration", configuration,
|
||||
"--version-suffix", versionSuffix)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static void CreateZipFromDirectory(string directory, string artifactPath)
|
||||
{
|
||||
if (File.Exists(artifactPath))
|
||||
{
|
||||
File.Delete(artifactPath);
|
||||
}
|
||||
|
||||
ZipFile.CreateFromDirectory(directory, artifactPath, CompressionLevel.Optimal, false);
|
||||
}
|
||||
|
||||
private static void CreateTarBallFromDirectory(string directory, string artifactPath)
|
||||
{
|
||||
if (File.Exists(artifactPath))
|
||||
{
|
||||
File.Delete(artifactPath);
|
||||
}
|
||||
|
||||
Cmd("tar", "-czf", artifactPath, "-C", directory, ".")
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
|
||||
private static void FixPermissions(string directory)
|
||||
{
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
// Reset everything to user readable/writeable and group and world readable.
|
||||
FS.ChmodAll(directory, "*", "644");
|
||||
|
||||
// Now make things that should be executable, executable.
|
||||
FS.FixModeFlags(directory);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,163 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class PkgTargets
|
||||
{
|
||||
public static string PkgsIntermediateDir { get; set; }
|
||||
public static string SharedHostComponentId { get; set; }
|
||||
public static string SharedFxComponentId { get; set; }
|
||||
public static string HostFxrComponentId { get; set; }
|
||||
public static string SharedFxPkgId { get; set; }
|
||||
public static string SharedFrameworkNugetVersion { get; set; }
|
||||
public static string CLISdkComponentId { get; set; }
|
||||
public static string CLISdkPkgId { get; set; }
|
||||
public static string CLISdkNugetVersion { get; set; }
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult InitPkg(BuildTargetContext c)
|
||||
{
|
||||
PkgsIntermediateDir = Path.Combine(Dirs.Packages, "intermediate");
|
||||
Directory.CreateDirectory(PkgsIntermediateDir);
|
||||
|
||||
SharedHostComponentId = $"com.microsoft.dotnet.sharedhost.component.osx.x64";
|
||||
|
||||
string hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
|
||||
HostFxrComponentId = $"com.microsoft.dotnet.hostfxr.{hostFxrVersion}.component.osx.x64";
|
||||
|
||||
string sharedFrameworkNugetName = Monikers.SharedFrameworkName;
|
||||
SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
SharedFxComponentId = $"com.microsoft.dotnet.sharedframework.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.component.osx.x64";
|
||||
SharedFxPkgId = $"com.microsoft.dotnet.{sharedFrameworkNugetName}.{SharedFrameworkNugetVersion}.osx.x64";
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(InitPkg), nameof(GenerateSharedFrameworkProductArchive))]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult GeneratePkgs(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(GenerateSharedFrameworkPkg), nameof(GenerateSharedHostPkg), nameof(GenerateHostFxrPkg))]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult GenerateSharedFrameworkProductArchive(BuildTargetContext c)
|
||||
{
|
||||
string resourcePath = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedframework", "resources");
|
||||
string outFilePath = Path.Combine(PkgsIntermediateDir, c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkInstallerFile"));
|
||||
|
||||
string inputDistTemplatePath = Path.Combine(
|
||||
Dirs.RepoRoot,
|
||||
"packaging",
|
||||
"osx",
|
||||
"sharedframework",
|
||||
"shared-framework-distribution-template.xml");
|
||||
string distTemplate = File.ReadAllText(inputDistTemplatePath);
|
||||
string distributionPath = Path.Combine(PkgsIntermediateDir, "shared-framework-formatted-distribution.xml");
|
||||
string formattedDistContents =
|
||||
distTemplate.Replace("{SharedFxComponentId}", SharedFxComponentId)
|
||||
.Replace("{SharedHostComponentId}", SharedHostComponentId)
|
||||
.Replace("{HostFxrComponentId}", HostFxrComponentId)
|
||||
.Replace("{SharedFrameworkNugetName}", Monikers.SharedFrameworkName)
|
||||
.Replace("{SharedFrameworkNugetVersion}", SharedFrameworkNugetVersion)
|
||||
.Replace("{SharedFxBrandName}", Monikers.GetSharedFxBrandName(c))
|
||||
.Replace("{SharedHostBrandName}", Monikers.GetSharedHostBrandName(c))
|
||||
.Replace("{HostFxrBrandName}", Monikers.GetHostFxrBrandName(c));
|
||||
File.WriteAllText(distributionPath, formattedDistContents);
|
||||
|
||||
Cmd("productbuild",
|
||||
"--version", SharedFrameworkNugetVersion,
|
||||
"--identifier", SharedFxPkgId,
|
||||
"--package-path", PkgsIntermediateDir,
|
||||
"--resources", resourcePath,
|
||||
"--distribution", distributionPath,
|
||||
outFilePath)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult GenerateSharedFrameworkPkg(BuildTargetContext c)
|
||||
{
|
||||
string outFilePath = Path.Combine(PkgsIntermediateDir, SharedFxComponentId + ".pkg");
|
||||
string installLocation = "/usr/local/share/dotnet";
|
||||
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedframework", "scripts");
|
||||
|
||||
Cmd("pkgbuild",
|
||||
"--root", c.BuildContext.Get<string>("SharedFrameworkPublishRoot"),
|
||||
"--identifier", SharedFxComponentId,
|
||||
"--version", SharedFrameworkNugetVersion,
|
||||
"--install-location", installLocation,
|
||||
"--scripts", scriptsLocation,
|
||||
outFilePath)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
File.Copy(outFilePath, c.BuildContext.Get<string>("SharedFrameworkInstallerFile"), true);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult GenerateSharedHostPkg(BuildTargetContext c)
|
||||
{
|
||||
string version = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
|
||||
string outFilePath = Path.Combine(PkgsIntermediateDir, SharedHostComponentId + ".pkg");
|
||||
string installLocation = "/usr/local/share/dotnet";
|
||||
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "sharedhost", "scripts");
|
||||
|
||||
Cmd("pkgbuild",
|
||||
"--root", c.BuildContext.Get<string>("SharedHostPublishRoot"),
|
||||
"--identifier", SharedHostComponentId,
|
||||
"--version", version,
|
||||
"--install-location", installLocation,
|
||||
"--scripts", scriptsLocation,
|
||||
outFilePath)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
File.Copy(outFilePath, c.BuildContext.Get<string>("SharedHostInstallerFile"), true);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.OSX)]
|
||||
public static BuildTargetResult GenerateHostFxrPkg(BuildTargetContext c)
|
||||
{
|
||||
string hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
|
||||
string outFilePath = Path.Combine(PkgsIntermediateDir, HostFxrComponentId + ".pkg");
|
||||
string installLocation = "/usr/local/share/dotnet";
|
||||
string scriptsLocation = Path.Combine(Dirs.RepoRoot, "packaging", "osx", "hostfxr", "scripts");
|
||||
|
||||
Cmd("pkgbuild",
|
||||
"--root", c.BuildContext.Get<string>("HostFxrPublishRoot"),
|
||||
"--identifier", HostFxrComponentId,
|
||||
"--version", hostFxrVersion,
|
||||
"--install-location", installLocation,
|
||||
"--scripts", scriptsLocation,
|
||||
outFilePath)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
File.Copy(outFilePath, c.BuildContext.Get<string>("HostFxrInstallerFile"), true);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,442 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.InternalAbstractions;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
using static Microsoft.DotNet.Cli.Build.FS;
|
||||
using static Microsoft.DotNet.Cli.Build.Utils;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class PrepareTargets
|
||||
{
|
||||
[Target(nameof(Init))]
|
||||
public static BuildTargetResult Prepare(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(nameof(CheckPrereqCmakePresent), nameof(CheckPlatformDependencies))]
|
||||
public static BuildTargetResult CheckPrereqs(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(nameof(CheckCoreclrPlatformDependencies))]
|
||||
public static BuildTargetResult CheckPlatformDependencies(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(nameof(CheckUbuntuCoreclrAndCoreFxDependencies), nameof(CheckCentOSCoreclrAndCoreFxDependencies))]
|
||||
public static BuildTargetResult CheckCoreclrPlatformDependencies(BuildTargetContext c) => c.Success();
|
||||
|
||||
// All major targets will depend on this in order to ensure variables are set up right if they are run independently.
|
||||
// The targets listed below are executed before Init Target is invoked.
|
||||
[Target(
|
||||
nameof(CommonInit),
|
||||
nameof(SetNuGetPackagesDir),
|
||||
nameof(GenerateVersions),
|
||||
nameof(CheckPrereqs),
|
||||
nameof(LocateStage0),
|
||||
nameof(ExpectedBuildArtifacts),
|
||||
nameof(RestorePackages),
|
||||
nameof(PackDotnetDebTool))]
|
||||
public static BuildTargetResult Init(BuildTargetContext c)
|
||||
{
|
||||
string platformEnv = c.BuildContext.Get<string>("Platform");
|
||||
|
||||
string targetFramework = Environment.GetEnvironmentVariable("TARGETFRAMEWORK") ?? "netcoreapp2.0";
|
||||
|
||||
string crossEnv = Environment.GetEnvironmentVariable("CROSS") ?? "0";
|
||||
if (string.Equals(crossEnv, "1"))
|
||||
{
|
||||
string rootfsDir = Environment.GetEnvironmentVariable("ROOTFS_DIR");
|
||||
if (string.IsNullOrEmpty(rootfsDir))
|
||||
{
|
||||
rootfsDir = Path.Combine(Dirs.RepoRoot, "cross", "rootfs", platformEnv);
|
||||
Environment.SetEnvironmentVariable("ROOTFS_DIR", rootfsDir);
|
||||
}
|
||||
}
|
||||
|
||||
c.BuildContext["Channel"] = Environment.GetEnvironmentVariable("CHANNEL");
|
||||
|
||||
c.BuildContext["TargetFramework"] = targetFramework;
|
||||
c.BuildContext["Cross"] = crossEnv;
|
||||
|
||||
bool linkPortable = c.BuildContext.Get<bool>("LinkPortable");
|
||||
string targetRID = c.BuildContext.Get<string>("TargetRID");
|
||||
|
||||
c.Info($"Building {c.BuildContext["Configuration"]} to: {Dirs.Output}");
|
||||
c.Info("Build Environment:");
|
||||
c.Info($" Operating System: {RuntimeEnvironment.OperatingSystem} {RuntimeEnvironment.OperatingSystemVersion}");
|
||||
c.Info($" Platform: " + platformEnv);
|
||||
c.Info($" Cross Build: " + int.Parse(crossEnv));
|
||||
c.Info($" Portable Linking: " + linkPortable);
|
||||
c.Info($" TargetRID: " + targetRID);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static string GetPortablePlatformForRID(string targetRID)
|
||||
{
|
||||
if (targetRID.StartsWith("win"))
|
||||
return "win";
|
||||
|
||||
if (targetRID.StartsWith("osx"))
|
||||
return "osx";
|
||||
|
||||
// Everything else is "linux"
|
||||
return "linux";
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CommonInit(BuildTargetContext c)
|
||||
{
|
||||
string platformEnv = Environment.GetEnvironmentVariable("TARGETPLATFORM") ?? RuntimeEnvironment.RuntimeArchitecture.ToString();
|
||||
|
||||
var configEnv = Environment.GetEnvironmentVariable("CONFIGURATION");
|
||||
if (string.IsNullOrEmpty(configEnv))
|
||||
{
|
||||
configEnv = "Debug";
|
||||
}
|
||||
c.BuildContext["Configuration"] = configEnv;
|
||||
|
||||
string targetRID = Environment.GetEnvironmentVariable("TARGETRID");
|
||||
string realTargetRID = targetRID;
|
||||
if (targetRID == null)
|
||||
{
|
||||
targetRID = RuntimeEnvironment.GetRuntimeIdentifier();
|
||||
realTargetRID = targetRID;
|
||||
|
||||
// Question: Why do we perform this translation? Utilities (e.g. Dirs.cs) do not account for this.
|
||||
if (targetRID.StartsWith("win") && (targetRID.EndsWith("x86") || targetRID.EndsWith("x64")))
|
||||
{
|
||||
targetRID = $"win7-{RuntimeEnvironment.RuntimeArchitecture}";
|
||||
}
|
||||
}
|
||||
|
||||
string szLinkPortable = Environment.GetEnvironmentVariable("DOTNET_BUILD_LINK_PORTABLE")?? "0";
|
||||
bool linkPortable = (int.Parse(szLinkPortable) == 1)?true:false;
|
||||
if (linkPortable)
|
||||
{
|
||||
string ridPortablePlatform = GetPortablePlatformForRID(targetRID);
|
||||
targetRID = $"{ridPortablePlatform}-{platformEnv}";
|
||||
realTargetRID = targetRID;
|
||||
|
||||
// Update/set the TARGETRID environment variable that will be used by various parts of the build
|
||||
Environment.SetEnvironmentVariable("TARGETRID", targetRID);
|
||||
}
|
||||
|
||||
|
||||
c.BuildContext["TargetRID"] = targetRID;
|
||||
|
||||
// Save the RID that will be used to create the RID specific subfolder under artifacts folder.
|
||||
// See Dirs.cs for details.
|
||||
c.BuildContext["ArtifactsTargetRID"] = realTargetRID;
|
||||
c.BuildContext["LinkPortable"] = linkPortable;
|
||||
c.BuildContext["Platform"] = platformEnv;
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult SetNuGetPackagesDir(BuildTargetContext c)
|
||||
{
|
||||
Environment.SetEnvironmentVariable("NUGET_PACKAGES", Dirs.NuGetPackages);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
public static BuildTargetResult PackDotnetDebTool(BuildTargetContext c)
|
||||
{
|
||||
var dotnet = DotNetCli.Stage0;
|
||||
var versionSuffix = c.BuildContext.Get<BuildVersion>("BuildVersion").VersionSuffix;
|
||||
|
||||
dotnet.Pack(
|
||||
Path.Combine(Dirs.RepoRoot, "setuptools", "dotnet-deb-tool", "project.json"),
|
||||
"--output", Dirs.PackagesIntermediate,
|
||||
"--version-suffix", versionSuffix)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
var packageFiles = Directory.EnumerateFiles(Dirs.PackagesIntermediate, "dotnet-deb-tool.*.nupkg");
|
||||
|
||||
foreach (var packageFile in packageFiles)
|
||||
{
|
||||
if (!packageFile.EndsWith(".symbols.nupkg"))
|
||||
{
|
||||
var destinationPath = Path.Combine(Dirs.Packages, Path.GetFileName(packageFile));
|
||||
File.Copy(packageFile, destinationPath, overwrite: true);
|
||||
}
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult GenerateVersions(BuildTargetContext c)
|
||||
{
|
||||
var commitCount = GitUtils.GetCommitCount();
|
||||
|
||||
var commitHash = GitUtils.GetCommitHash();
|
||||
|
||||
var branchInfo = new BranchInfo(Dirs.RepoRoot);
|
||||
|
||||
// Read details from branchinfo.txt for our build configuration
|
||||
int iMajor = int.Parse(branchInfo.Entries["MAJOR_VERSION"]);
|
||||
int iMinor = int.Parse(branchInfo.Entries["MINOR_VERSION"]);
|
||||
int iPatch = int.Parse(branchInfo.Entries["PATCH_VERSION"]);
|
||||
string sReleaseSuffix = branchInfo.Entries["RELEASE_SUFFIX"];
|
||||
bool fStabilizePackageVersion = bool.Parse(branchInfo.Entries["STABILIZE_PACKAGE_VERSION"]);
|
||||
bool fLockHostVersion = bool.Parse(branchInfo.Entries["LOCK_HOST_VERSION"]);
|
||||
|
||||
var hostVersion = new HostVersion()
|
||||
{
|
||||
Major = iMajor,
|
||||
Minor = iMinor,
|
||||
Patch = iPatch,
|
||||
ReleaseSuffix = sReleaseSuffix,
|
||||
EnsureStableVersion = fStabilizePackageVersion,
|
||||
IsLocked = fLockHostVersion,
|
||||
CommitCount = commitCount
|
||||
};
|
||||
|
||||
var buildVersion = new BuildVersion()
|
||||
{
|
||||
Major = iMajor,
|
||||
Minor = iMinor,
|
||||
Patch = iPatch,
|
||||
ReleaseSuffix = sReleaseSuffix,
|
||||
CommitCount = commitCount
|
||||
};
|
||||
|
||||
c.BuildContext["BuildVersion"] = buildVersion;
|
||||
c.BuildContext["HostVersion"] = hostVersion;
|
||||
c.BuildContext["CommitHash"] = commitHash;
|
||||
c.BuildContext["BranchName"] = branchInfo.Entries["BRANCH_NAME"];
|
||||
|
||||
// Define the version string to be used based upon whether we are stabilizing the versions or not.
|
||||
if (!fStabilizePackageVersion)
|
||||
c.BuildContext["SharedFrameworkNugetVersion"] = buildVersion.NetCoreAppVersion;
|
||||
else
|
||||
c.BuildContext["SharedFrameworkNugetVersion"] = buildVersion.ProductionVersion;
|
||||
|
||||
c.Info($"Building Version: {hostVersion.LatestHostVersion.WithoutSuffix} (NuGet Packages: {hostVersion.LatestHostVersion})");
|
||||
c.Info($"From Commit: {commitHash}");
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult LocateStage0(BuildTargetContext c)
|
||||
{
|
||||
// We should have been run in the repo root, so locate the stage 0 relative to current directory
|
||||
var stage0 = DotNetCli.Stage0.BinPath;
|
||||
|
||||
if (!Directory.Exists(stage0))
|
||||
{
|
||||
return c.Failed($"Stage 0 directory does not exist: {stage0}");
|
||||
}
|
||||
|
||||
// Identify the version
|
||||
string versionFile = Directory.GetFiles(stage0, ".version", SearchOption.AllDirectories).FirstOrDefault();
|
||||
|
||||
if (string.IsNullOrEmpty(versionFile))
|
||||
{
|
||||
throw new Exception($"'.version' file not found in '{stage0}' folder");
|
||||
}
|
||||
|
||||
var version = File.ReadAllLines(versionFile);
|
||||
c.Info($"Using Stage 0 Version: {version[1]}");
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult ExpectedBuildArtifacts(BuildTargetContext c)
|
||||
{
|
||||
var config = c.BuildContext.Get<string>("Configuration");
|
||||
var versionBadgeName = $"sharedfx_{Monikers.GetBadgeMoniker(c)}_{config}_version_badge.svg";
|
||||
c.BuildContext["VersionBadge"] = Path.Combine(Dirs.Output, versionBadgeName);
|
||||
|
||||
var sharedFrameworkVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
var hostVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
|
||||
var hostFxrVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
|
||||
|
||||
AddInstallerArtifactToContext(c, "dotnet-host", "SharedHost", hostVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-hostfxr", "HostFxr", hostFxrVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-sharedframework", "SharedFramework", sharedFrameworkVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-sharedframework-symbols", "SharedFrameworkSymbols", sharedFrameworkVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet", "CombinedMuxerHostFxrFramework", sharedFrameworkVersion);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static void AddInstallerArtifactToContext(
|
||||
BuildTargetContext c,
|
||||
string artifactPrefix,
|
||||
string contextPrefix,
|
||||
string version)
|
||||
{
|
||||
var productName = Monikers.GetProductMoniker(c, artifactPrefix, version);
|
||||
bool linkPortable = c.BuildContext.Get<bool>("LinkPortable");
|
||||
if (linkPortable)
|
||||
{
|
||||
// If we are building portable binaries, then reflect the same in the installer binary name as well.
|
||||
productName = productName+"-portable";
|
||||
}
|
||||
|
||||
var extension = CurrentPlatform.IsWindows ? ".zip" : ".tar.gz";
|
||||
c.BuildContext[contextPrefix + "CompressedFile"] = Path.Combine(Dirs.Packages, productName + extension);
|
||||
|
||||
string installer = "";
|
||||
switch (CurrentPlatform.Current)
|
||||
{
|
||||
case BuildPlatform.Windows:
|
||||
if (contextPrefix.Contains("Combined"))
|
||||
{
|
||||
installer = productName + ".exe";
|
||||
}
|
||||
else
|
||||
{
|
||||
installer = productName + ".msi";
|
||||
}
|
||||
break;
|
||||
case BuildPlatform.OSX:
|
||||
installer = productName + ".pkg";
|
||||
break;
|
||||
case BuildPlatform.Ubuntu:
|
||||
case BuildPlatform.Debian:
|
||||
installer = productName + ".deb";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(installer))
|
||||
{
|
||||
c.BuildContext[contextPrefix + "InstallerFile"] = Path.Combine(Dirs.Packages, installer);
|
||||
}
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
public static BuildTargetResult CheckUbuntuCoreclrAndCoreFxDependencies(BuildTargetContext c)
|
||||
{
|
||||
var errorMessageBuilder = new StringBuilder();
|
||||
var stage0 = DotNetCli.Stage0.BinPath;
|
||||
|
||||
foreach (var package in PackageDependencies.UbuntuCoreclrAndCoreFxDependencies)
|
||||
{
|
||||
if (!AptDependencyUtility.PackageIsInstalled(package))
|
||||
{
|
||||
errorMessageBuilder.Append($"Error: Coreclr package dependency {package} missing.");
|
||||
errorMessageBuilder.Append(Environment.NewLine);
|
||||
errorMessageBuilder.Append($"-> install with apt-get install {package}");
|
||||
errorMessageBuilder.Append(Environment.NewLine);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorMessageBuilder.Length == 0)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
else
|
||||
{
|
||||
return c.Failed(errorMessageBuilder.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.CentOS)]
|
||||
public static BuildTargetResult CheckCentOSCoreclrAndCoreFxDependencies(BuildTargetContext c)
|
||||
{
|
||||
var errorMessageBuilder = new StringBuilder();
|
||||
|
||||
foreach (var package in PackageDependencies.CentosCoreclrAndCoreFxDependencies)
|
||||
{
|
||||
if (!YumDependencyUtility.PackageIsInstalled(package))
|
||||
{
|
||||
errorMessageBuilder.Append($"Error: Coreclr package dependency {package} missing.");
|
||||
errorMessageBuilder.Append(Environment.NewLine);
|
||||
errorMessageBuilder.Append($"-> install with yum install {package}");
|
||||
errorMessageBuilder.Append(Environment.NewLine);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorMessageBuilder.Length == 0)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
else
|
||||
{
|
||||
return c.Failed(errorMessageBuilder.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult RestorePackages(BuildTargetContext c)
|
||||
{
|
||||
var dotnet = DotNetCli.Stage0;
|
||||
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "setuptools", "dotnet-deb-tool"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
var independentToolsRoot = Path.Combine(c.BuildContext.BuildDirectory, "setuptools", "independent");
|
||||
|
||||
foreach (string templateFile in Directory.GetFiles(independentToolsRoot, "project.json.template", SearchOption.AllDirectories))
|
||||
{
|
||||
string projectJsonFile = Path.Combine(Path.GetDirectoryName(templateFile), "project.json");
|
||||
File.WriteAllText(projectJsonFile, File.ReadAllText(templateFile).Replace("{RID}", RuntimeEnvironment.GetRuntimeIdentifier()));
|
||||
}
|
||||
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "setuptools", "independent"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "src"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CheckPrereqCmakePresent(BuildTargetContext c)
|
||||
{
|
||||
try
|
||||
{
|
||||
Command.Create("cmake", "--version")
|
||||
.CaptureStdOut()
|
||||
.CaptureStdErr()
|
||||
.Execute();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string message = $@"Error running cmake: {ex.Message}
|
||||
cmake is required to build the native host 'corehost'";
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
message += Environment.NewLine + "Download it from https://www.cmake.org";
|
||||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
message += Environment.NewLine + "Ubuntu: 'sudo apt-get install cmake'";
|
||||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
message += Environment.NewLine + "OS X w/Homebrew: 'brew install cmake'";
|
||||
}
|
||||
return c.Failed(message);
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
DebugHelper.HandleDebugSwitch(ref args);
|
||||
|
||||
return BuildSetup.Create(".NET Core Host")
|
||||
.UseStandardGoals()
|
||||
.UseAllTargetsFromAssembly<Program>()
|
||||
.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,501 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.WindowsAzure.Storage;
|
||||
using Microsoft.WindowsAzure.Storage.Blob;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public static class PublishTargets
|
||||
{
|
||||
private static AzurePublisher AzurePublisherTool { get; set; }
|
||||
|
||||
private static DebRepoPublisher DebRepoPublisherTool { get; set; }
|
||||
|
||||
private static string Channel { get; set; }
|
||||
|
||||
private static string CommitHash { get; set; }
|
||||
|
||||
private static string SharedFrameworkNugetVersion { get; set; }
|
||||
|
||||
private static string SharedHostNugetVersion { get; set; }
|
||||
|
||||
private static string HostFxrNugetVersion { get; set; }
|
||||
|
||||
private static bool IncludeSymbolPackages { get; set; }
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult InitPublish(BuildTargetContext c)
|
||||
{
|
||||
AzurePublisherTool = new AzurePublisher();
|
||||
DebRepoPublisherTool = new DebRepoPublisher(Dirs.Packages);
|
||||
SharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
SharedHostNugetVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostVersion.ToString();
|
||||
HostFxrNugetVersion = c.BuildContext.Get<HostVersion>("HostVersion").LockedHostFxrVersion.ToString();
|
||||
Channel = c.BuildContext.Get<string>("Channel");
|
||||
CommitHash = c.BuildContext.Get<string>("CommitHash");
|
||||
|
||||
// Do not publish symbol packages on a release branch.
|
||||
IncludeSymbolPackages = !c.BuildContext.Get<string>("BranchName").StartsWith("release/");
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PrepareTargets.Init),
|
||||
nameof(PublishTargets.InitPublish),
|
||||
nameof(PublishTargets.PublishArtifacts),
|
||||
nameof(PublishTargets.FinalizeBuild))]
|
||||
[Environment("PUBLISH_TO_AZURE_BLOB", "1", "true")] // This is set by CI systems
|
||||
public static BuildTargetResult Publish(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
[BuildArchitectures(BuildArchitecture.x64)]
|
||||
public static BuildTargetResult PublishDotnetDebToolPackage(BuildTargetContext c)
|
||||
{
|
||||
string apiKey = EnvVars.EnsureVariable("CLI_NUGET_API_KEY");
|
||||
|
||||
string nugetFeedUrl = EnvVars.EnsureVariable("CLI_NUGET_FEED_URL");
|
||||
NuGetUtil.PushPackages(Dirs.Packages, nugetFeedUrl, apiKey, NuGetUtil.NuGetIncludePackageType.Standard);
|
||||
if (IncludeSymbolPackages)
|
||||
{
|
||||
string symbolsNugetFeedUrl = EnvVars.EnsureVariable("CLI_NUGET_SYMBOLS_FEED_URL");
|
||||
NuGetUtil.PushPackages(Dirs.Packages, symbolsNugetFeedUrl, apiKey, NuGetUtil.NuGetIncludePackageType.Symbols);
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult FinalizeBuild(BuildTargetContext c)
|
||||
{
|
||||
if (CheckIfAllBuildsHavePublished(c))
|
||||
{
|
||||
string targetContainer = $"{Channel}/Binaries/Latest/";
|
||||
string targetVersionFile = $"{targetContainer}{CommitHash}";
|
||||
string semaphoreBlob = $"{Channel}/Binaries/sharedFxPublishSemaphore";
|
||||
AzurePublisherTool.CreateBlobIfNotExists(semaphoreBlob);
|
||||
|
||||
string leaseId = AzurePublisherTool.AcquireLeaseOnBlob(semaphoreBlob);
|
||||
|
||||
// Prevent race conditions by dropping a version hint of what version this is. If we see this file
|
||||
// and it is the same as our version then we know that a race happened where two+ builds finished
|
||||
// at the same time and someone already took care of publishing and we have no work to do.
|
||||
if (AzurePublisherTool.IsLatestSpecifiedVersion(targetVersionFile))
|
||||
{
|
||||
AzurePublisherTool.ReleaseLeaseOnBlob(semaphoreBlob, leaseId);
|
||||
return c.Success();
|
||||
}
|
||||
else
|
||||
{
|
||||
Regex versionFileRegex = new Regex(@"(?<CommitHash>[\w\d]{40})");
|
||||
|
||||
// Delete old version files
|
||||
AzurePublisherTool.ListBlobs($"{targetContainer}")
|
||||
.Select(s => s.Replace("/dotnet/", ""))
|
||||
.Where(s => versionFileRegex.IsMatch(s))
|
||||
.ToList()
|
||||
.ForEach(f => AzurePublisherTool.TryDeleteBlob(f));
|
||||
|
||||
// Drop the version file signaling such for any race-condition builds (see above comment).
|
||||
AzurePublisherTool.DropLatestSpecifiedVersion(targetVersionFile);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Copy the shared framework + host Archives
|
||||
CopyBlobs($"{Channel}/Binaries/{SharedFrameworkNugetVersion}/", targetContainer);
|
||||
|
||||
// Copy the shared framework installers
|
||||
CopyBlobs($"{Channel}/Installers/{SharedFrameworkNugetVersion}/", $"{Channel}/Installers/Latest/");
|
||||
|
||||
// Copy the shared host installers
|
||||
CopyBlobs($"{Channel}/Installers/{SharedHostNugetVersion}/", $"{Channel}/Installers/Latest/");
|
||||
|
||||
// Generate the Sharedfx Version text files
|
||||
List<string> versionFiles = new List<string>()
|
||||
{
|
||||
"win.x86.portable.version",
|
||||
"win.x64.portable.version",
|
||||
"win.arm.portable.version",
|
||||
"win.arm64.portable.version",
|
||||
"linux.x64.portable.version",
|
||||
"ubuntu.x64.version",
|
||||
"linux.arm.portable.version",
|
||||
"ubuntu.16.04.x64.version",
|
||||
"ubuntu.16.10.x64.version",
|
||||
"osx.x64.portable.version",
|
||||
"debian.x64.version",
|
||||
};
|
||||
|
||||
PublishCoreHostPackagesToFeed();
|
||||
|
||||
string sfxVersion = Utils.GetSharedFrameworkVersionFileContent(c);
|
||||
foreach (string version in versionFiles)
|
||||
{
|
||||
AzurePublisherTool.PublishStringToBlob($"{Channel}/dnvm/latest.sharedfx.{version}", sfxVersion);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
AzurePublisherTool.ReleaseLeaseOnBlob(semaphoreBlob, leaseId);
|
||||
}
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static void CopyBlobs(string sourceFolder, string destinationFolder)
|
||||
{
|
||||
Console.WriteLine($"--Copying blobs from '{sourceFolder}' to '{destinationFolder}'");
|
||||
foreach (string blob in AzurePublisherTool.ListBlobs(sourceFolder))
|
||||
{
|
||||
string source = blob.Replace("/dotnet/", "");
|
||||
string targetName = Path.GetFileName(blob)
|
||||
.Replace(SharedFrameworkNugetVersion, "latest")
|
||||
.Replace(SharedHostNugetVersion, "latest");
|
||||
string target = $"{destinationFolder}{targetName}";
|
||||
AzurePublisherTool.CopyBlob(source, target);
|
||||
}
|
||||
}
|
||||
|
||||
private static void PublishCoreHostPackagesToFeed()
|
||||
{
|
||||
var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}";
|
||||
|
||||
Directory.CreateDirectory(Dirs.PackagesNoRID);
|
||||
AzurePublisherTool.DownloadFilesWithExtension(hostBlob, ".nupkg", Dirs.PackagesNoRID);
|
||||
|
||||
string apiKey = EnvVars.EnsureVariable("NUGET_API_KEY");
|
||||
|
||||
string nugetFeedUrl = EnvVars.EnsureVariable("NUGET_FEED_URL");
|
||||
NuGetUtil.PushPackages(Dirs.PackagesNoRID, nugetFeedUrl, apiKey, NuGetUtil.NuGetIncludePackageType.Standard);
|
||||
|
||||
if (IncludeSymbolPackages)
|
||||
{
|
||||
string symbolsNugetFeedUrl = EnvVars.EnsureVariable("NUGET_SYMBOLS_FEED_URL");
|
||||
NuGetUtil.PushPackages(Dirs.PackagesNoRID, symbolsNugetFeedUrl, apiKey, NuGetUtil.NuGetIncludePackageType.Symbols);
|
||||
}
|
||||
|
||||
string githubAuthToken = EnvVars.EnsureVariable("GITHUB_PASSWORD");
|
||||
VersionRepoUpdater repoUpdater = new VersionRepoUpdater(githubAuthToken);
|
||||
repoUpdater.UpdatePublishedVersions(Dirs.PackagesNoRID, $"build-info/dotnet/core-setup/{Channel}/Latest").Wait();
|
||||
}
|
||||
|
||||
private static bool CheckIfAllBuildsHavePublished(BuildTargetContext c)
|
||||
{
|
||||
Dictionary<string, bool> badges = new Dictionary<string, bool>()
|
||||
{
|
||||
{ "sharedfx_win_portable_x86", false },
|
||||
{ "sharedfx_win_portable_x64", false },
|
||||
{ "sharedfx_win_portable_arm", false },
|
||||
{ "sharedfx_win_portable_arm64", false },
|
||||
{ "sharedfx_linux_portable_x64", false },
|
||||
{ "sharedfx_Ubuntu_x64", false },
|
||||
{ "sharedfx_linux_portable_arm", false },
|
||||
{ "sharedfx_Ubuntu_16_04_x64", false },
|
||||
{ "sharedfx_Ubuntu_16_10_x64", false },
|
||||
{ "sharedfx_osx_portable_x64", false },
|
||||
{ "sharedfx_Debian_x64", false },
|
||||
};
|
||||
|
||||
List<string> blobs = new List<string>(AzurePublisherTool.ListBlobs($"{Channel}/Binaries/{SharedFrameworkNugetVersion}/"));
|
||||
|
||||
var versionBadgeName = $"sharedfx_{Monikers.GetBadgeMoniker(c)}";
|
||||
if (badges.ContainsKey(versionBadgeName) == false)
|
||||
{
|
||||
throw new ArgumentException($"A new OS build ({versionBadgeName}) was added without adding the moniker to the {nameof(badges)} lookup");
|
||||
}
|
||||
|
||||
foreach (string file in blobs)
|
||||
{
|
||||
string name = Path.GetFileName(file);
|
||||
|
||||
if (!name.EndsWith(".svg"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Include _ delimiter when matching to prevent finding both arm and arm64 badges
|
||||
// when checking the arm badge file.
|
||||
string[] matchingBadgeKeys = badges.Keys
|
||||
.Where(badgeName => name.StartsWith($"{badgeName}_"))
|
||||
.ToArray();
|
||||
|
||||
if (matchingBadgeKeys.Length == 1)
|
||||
{
|
||||
badges[matchingBadgeKeys[0]] = true;
|
||||
}
|
||||
else if (matchingBadgeKeys.Length > 1)
|
||||
{
|
||||
throw new BuildFailureException(
|
||||
$"Expected 0 or 1 badges matching file '{name}', " +
|
||||
$"found {matchingBadgeKeys.Length}: " +
|
||||
string.Join(", ", matchingBadgeKeys));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string unfinishedBadge in badges.Where(pair => !pair.Value).Select(pair => pair.Key))
|
||||
{
|
||||
Console.WriteLine($"Not all builds complete, badge not found: {unfinishedBadge}");
|
||||
}
|
||||
|
||||
return badges.Keys.All(key => badges[key]);
|
||||
}
|
||||
|
||||
[Target(
|
||||
nameof(PublishTargets.PublishInstallerFilesToAzure),
|
||||
nameof(PublishTargets.PublishArchivesToAzure),
|
||||
nameof(PublishTargets.PublishDotnetDebToolPackage),
|
||||
nameof(PublishTargets.PublishDebFilesToDebianRepo),
|
||||
nameof(PublishTargets.PublishCoreHostPackages),
|
||||
nameof(PublishTargets.PublishManagedPackages),
|
||||
nameof(PublishTargets.PublishSharedFrameworkVersionBadge))]
|
||||
public static BuildTargetResult PublishArtifacts(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(
|
||||
nameof(PublishTargets.PublishSharedHostInstallerFileToAzure),
|
||||
nameof(PublishTargets.PublishHostFxrInstallerFileToAzure),
|
||||
nameof(PublishTargets.PublishSharedFrameworkInstallerFileToAzure),
|
||||
nameof(PublishTargets.PublishCombinedMuxerHostFxrFrameworkInstallerFileToAzure))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.OSX, BuildPlatform.Windows, BuildPlatform.Debian)]
|
||||
|
||||
// We do not spport publishing platform installers for any other architecture on any supported platform
|
||||
// yet.
|
||||
[BuildArchitectures(BuildArchitecture.x64,BuildArchitecture.x86)]
|
||||
public static BuildTargetResult PublishInstallerFilesToAzure(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(
|
||||
nameof(PublishTargets.PublishHostFxrArchiveToAzure),
|
||||
nameof(PublishTargets.PublishSharedFrameworkArchiveToAzure),
|
||||
nameof(PublishTargets.PublishSharedFrameworkSymbolsArchiveToAzure),
|
||||
nameof(PublishTargets.PublishCombinedMuxerHostFxrFrameworkArchiveToAzure))]
|
||||
public static BuildTargetResult PublishArchivesToAzure(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(
|
||||
nameof(PublishSharedFrameworkDebToDebianRepo),
|
||||
nameof(PublishHostFxrDebToDebianRepo),
|
||||
nameof(PublishSharedHostDebToDebianRepo))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
// We do not spport publishing platform installers for any other architecture on any supported platform
|
||||
// yet.
|
||||
[BuildArchitectures(BuildArchitecture.x64)]
|
||||
public static BuildTargetResult PublishDebFilesToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishSharedFrameworkVersionBadge(BuildTargetContext c)
|
||||
{
|
||||
var versionBadge = c.BuildContext.Get<string>("VersionBadge");
|
||||
var versionBadgeBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(versionBadge)}";
|
||||
AzurePublisherTool.PublishFile(versionBadgeBlob, versionBadge);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishCoreHostPackages(BuildTargetContext c)
|
||||
{
|
||||
foreach (var file in Directory.GetFiles(Dirs.CorehostLocalPackages, "*.nupkg"))
|
||||
{
|
||||
if (!IsRidAgnosticPackage(file) || EnvVars.PublishRidAgnosticPackages)
|
||||
{
|
||||
var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(file)}";
|
||||
AzurePublisherTool.PublishFile(hostBlob, file);
|
||||
Console.WriteLine($"Publishing package {hostBlob} to Azure.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"Skipping publishing package {file} to Azure because it is RID-agnostic and EnvVars.PublishRidAgnosticPackages is not set to true.");
|
||||
}
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static bool IsRidAgnosticPackage(string packagePath)
|
||||
{
|
||||
var fileName = Path.GetFileName(packagePath);
|
||||
return !fileName.StartsWith("runtime.", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishManagedPackages(BuildTargetContext c)
|
||||
{
|
||||
// When building on non windows platforms, we don't compile the full set of
|
||||
// tfms a package targets (to prevent the need of having mono and the reference
|
||||
// assemblies installed. So we shouldn't publish these packages.
|
||||
if (EnvVars.PublishRidAgnosticPackages && CurrentPlatform.IsWindows)
|
||||
{
|
||||
foreach (var file in Directory.GetFiles(Dirs.Packages, "*.nupkg"))
|
||||
{
|
||||
var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}/{Path.GetFileName(file)}";
|
||||
AzurePublisherTool.PublishFile(hostBlob, file);
|
||||
Console.WriteLine($"Publishing package {hostBlob} to Azure.");
|
||||
}
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishSharedHostInstallerFileToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedHostNugetVersion;
|
||||
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||
|
||||
if (CurrentPlatform.Current == BuildPlatform.Windows)
|
||||
{
|
||||
installerFile = Path.ChangeExtension(installerFile, "msi");
|
||||
}
|
||||
|
||||
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishHostFxrInstallerFileToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = HostFxrNugetVersion;
|
||||
var installerFile = c.BuildContext.Get<string>("HostFxrInstallerFile");
|
||||
|
||||
if (CurrentPlatform.Current == BuildPlatform.Windows)
|
||||
{
|
||||
installerFile = Path.ChangeExtension(installerFile, "msi");
|
||||
}
|
||||
|
||||
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishSharedFrameworkInstallerFileToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var installerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||
|
||||
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.OSX, BuildPlatform.Windows)]
|
||||
public static BuildTargetResult PublishCombinedMuxerHostFxrFrameworkInstallerFileToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var installerFile = c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkInstallerFile");
|
||||
|
||||
AzurePublisherTool.PublishInstallerFile(installerFile, Channel, version);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishCombinedMuxerHostFxrFrameworkArchiveToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var archiveFile = c.BuildContext.Get<string>("CombinedMuxerHostFxrFrameworkCompressedFile");
|
||||
|
||||
AzurePublisherTool.PublishArchive(archiveFile, Channel, version);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishHostFxrArchiveToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var archiveFile = c.BuildContext.Get<string>("HostFxrCompressedFile");
|
||||
|
||||
AzurePublisherTool.PublishArchive(archiveFile, Channel, version);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishSharedFrameworkArchiveToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var archiveFile = c.BuildContext.Get<string>("SharedFrameworkCompressedFile");
|
||||
|
||||
AzurePublisherTool.PublishArchive(archiveFile, Channel, version);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishSharedFrameworkSymbolsArchiveToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
var archiveFile = c.BuildContext.Get<string>("SharedFrameworkSymbolsCompressedFile");
|
||||
|
||||
AzurePublisherTool.PublishArchive(archiveFile, Channel, version);
|
||||
return c.Success();
|
||||
}
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
public static BuildTargetResult PublishSharedFrameworkDebToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedFrameworkNugetVersion;
|
||||
|
||||
var packageName = Monikers.GetDebianSharedFrameworkPackageName(version);
|
||||
var installerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
|
||||
|
||||
DebRepoPublisherTool.PublishDebFileToDebianRepo(
|
||||
packageName,
|
||||
version,
|
||||
uploadUrl);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
public static BuildTargetResult PublishSharedHostDebToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var version = SharedHostNugetVersion;
|
||||
|
||||
var packageName = Monikers.GetDebianSharedHostPackageName(c);
|
||||
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
|
||||
|
||||
DebRepoPublisherTool.PublishDebFileToDebianRepo(
|
||||
packageName,
|
||||
version,
|
||||
uploadUrl);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, BuildPlatform.Debian)]
|
||||
public static BuildTargetResult PublishHostFxrDebToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var version = HostFxrNugetVersion;
|
||||
|
||||
var packageName = Monikers.GetDebianHostFxrPackageName(version);
|
||||
var installerFile = c.BuildContext.Get<string>("HostFxrInstallerFile");
|
||||
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
|
||||
|
||||
DebRepoPublisherTool.PublishDebFileToDebianRepo(
|
||||
packageName,
|
||||
version,
|
||||
uploadUrl);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
|
||||
using static Microsoft.DotNet.Cli.Build.FS;
|
||||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
using static Microsoft.DotNet.Cli.Build.Utils;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
|
||||
namespace Microsoft.DotNet.Host.Build
|
||||
{
|
||||
public class TestTargets
|
||||
{
|
||||
public static readonly string[] TestProjects = new[]
|
||||
{
|
||||
"HostActivationTests",
|
||||
"Microsoft.Extensions.DependencyModel.Tests"
|
||||
};
|
||||
|
||||
[Target(
|
||||
nameof(PrepareTargets.Init),
|
||||
nameof(RestoreTestAssets),
|
||||
nameof(RestoreTests),
|
||||
nameof(BuildTests),
|
||||
nameof(RunTests))]
|
||||
[Environment("DOTNET_BUILD_SKIP_TESTS", null, "0", "false")]
|
||||
public static BuildTargetResult Test(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult RestoreTestAssets(BuildTargetContext c)
|
||||
{
|
||||
var dotnet = DotNetCli.Stage0;
|
||||
CleanBinObj(c, Path.Combine(Dirs.RepoRoot, "TestAssets"));
|
||||
|
||||
dotnet.Restore(
|
||||
"--fallbacksource", Dirs.CorehostLocalPackages,
|
||||
"--disable-parallel")
|
||||
.WorkingDirectory(Path.Combine(Dirs.RepoRoot, "TestAssets"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult RestoreTests(BuildTargetContext c)
|
||||
{
|
||||
var dotnet = DotNetCli.Stage0;
|
||||
CleanBinObj(c, Path.Combine(Dirs.RepoRoot, "test"));
|
||||
|
||||
dotnet.Restore("--disable-parallel")
|
||||
.WorkingDirectory(Path.Combine(Dirs.RepoRoot, "test"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult BuildTests(BuildTargetContext c)
|
||||
{
|
||||
var dotnet = DotNetCli.Stage0;
|
||||
|
||||
var configuration = c.BuildContext.Get<string>("Configuration");
|
||||
|
||||
foreach (var testProject in TestProjects)
|
||||
{
|
||||
c.Info($"Building tests: {testProject}");
|
||||
dotnet.Build("--configuration", configuration)
|
||||
.WorkingDirectory(Path.Combine(Dirs.RepoRoot, "test", testProject))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
}
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult RunTests(BuildTargetContext c)
|
||||
{
|
||||
var dotnet = DotNetCli.Stage0;
|
||||
|
||||
var configuration = c.BuildContext.Get<string>("Configuration");
|
||||
|
||||
var failingTests = RunDotnetTestOnTestProjects(c, dotnet, configuration);
|
||||
if (failingTests.Any())
|
||||
{
|
||||
foreach (var project in failingTests)
|
||||
{
|
||||
c.Error($"{project} failed");
|
||||
}
|
||||
return c.Failed("Tests failed!");
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static List<string> RunDotnetTestOnTestProjects(BuildTargetContext c, DotNetCli dotnet, string configuration)
|
||||
{
|
||||
var failingTests = new List<string>();
|
||||
|
||||
// Fetch the target RID to determine if we support running tests or not.
|
||||
string rid = c.BuildContext.Get<string>("TargetRID");
|
||||
bool fIsCrossArch = Utils.IsCrossArchRID(rid);
|
||||
|
||||
foreach (var project in TestProjects)
|
||||
{
|
||||
// Explicitly checking for the host tests since they are the only ones running native code.
|
||||
if (String.Compare("HostActivationTests", project) == 0)
|
||||
{
|
||||
// We dont support running native tests for cross-architecture builds yet.
|
||||
if (fIsCrossArch)
|
||||
{
|
||||
c.Info($"Skipping tests in: {project} since cross-arch test runs are not yet supported for {rid}.");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
c.Info($"Running tests in: {project}");
|
||||
|
||||
string actualTargetRid = c.BuildContext.Get<string>("ArtifactsTargetRID");
|
||||
|
||||
var result = dotnet.Test("--configuration", configuration, "-xml", $"{project}-testResults.xml", "-notrait", "category=failing")
|
||||
.WorkingDirectory(Path.Combine(Dirs.RepoRoot, "test", project))
|
||||
.EnvironmentVariable("PATH", $"{dotnet.BinPath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}")
|
||||
.EnvironmentVariable("TEST_ARTIFACTS", Dirs.TestArtifacts)
|
||||
.EnvironmentVariable("TEST_TARGETRID", actualTargetRid)
|
||||
.Execute();
|
||||
|
||||
if (result.ExitCode != 0)
|
||||
{
|
||||
failingTests.Add(project);
|
||||
}
|
||||
}
|
||||
|
||||
return failingTests;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,151 +0,0 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
param(
|
||||
[string]$Configuration="Debug",
|
||||
[string]$Architecture="x64",
|
||||
[string]$TargetArch="",
|
||||
[string]$ToolsetDir="",
|
||||
[string]$Framework="netcoreapp2.0",
|
||||
[string[]]$Targets=@("Default"),
|
||||
[string[]]$EnvVars=@(),
|
||||
[switch]$NoPackage,
|
||||
[switch]$Portable,
|
||||
[switch]$Help)
|
||||
|
||||
if($Help)
|
||||
{
|
||||
Write-Host "Usage: .\build.ps1 [-Configuration <CONFIGURATION>] [-NoPackage] [-Portable] [-Help] [-Targets <TARGETS...>]"
|
||||
Write-Host ""
|
||||
Write-Host "Options:"
|
||||
Write-Host " -Configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
|
||||
Write-Host " -Architecture <ARCHITECTURE> Build on the specified architecture (x64 or x86 (supported only on Windows), default: x64)"
|
||||
Write-Host " -TargetArch <ARCHITECTURE> Build for the specified architecture (x64, x86 (supported only on Windows), arm, or arm64, default: x64)"
|
||||
Write-Host " -ToolsetDir <TOOLSETDIR> Temporary variable specifying a path to a toolset to use when building the native host for ARM64. To be removed when the toolset is publicly available. )"
|
||||
Write-Host " -Framework <FRAMEWORK> Build the specified framework (netcoreapp1.0 or netcoreapp1.1, default: netcoreapp1.0)"
|
||||
Write-Host " -Targets <TARGETS...> Comma separated build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
|
||||
Write-Host " -EnvVars <'V1=val1','V2=val2'...> Comma separated list of environment variable name-value pairs"
|
||||
Write-Host " -NoPackage Skip packaging targets"
|
||||
Write-Host " -Portable Optional argument to build portable platform packages"
|
||||
Write-Host " -Help Display this help message"
|
||||
exit 0
|
||||
}
|
||||
|
||||
$env:CONFIGURATION = $Configuration;
|
||||
if (!$TargetArch)
|
||||
{
|
||||
$TargetArch = $Architecture
|
||||
}
|
||||
$env:TARGETPLATFORM = $TargetArch;
|
||||
$env:TARGETFRAMEWORK = $Framework;
|
||||
$RepoRoot = "$PSScriptRoot\..\.."
|
||||
$env:NUGET_PACKAGES = "$RepoRoot\.nuget\packages"
|
||||
|
||||
if($TargetArch -eq "arm64")
|
||||
{
|
||||
if ($Framework -eq "netcoreapp1.0")
|
||||
{
|
||||
throw "ARM64 is not available on netcoreapp1.0. Pass in '-Framework netcoreapp1.1' to enable ARM64"
|
||||
}
|
||||
$env:__ToolsetDir = $ToolsetDir;
|
||||
$env:TARGETRID = "win10-arm64";
|
||||
$env:PATH="$ToolsetDir\VC_sdk\bin;$env:PATH";
|
||||
$env:LIB="$ToolsetDir\VC_sdk\lib\arm64;$ToolsetDir\sdpublic\sdk\lib\arm64";
|
||||
$env:INCLUDE="$ToolsetDir\VC_sdk\inc;$ToolsetDir\sdpublic\sdk\inc;$ToolsetDir\sdpublic\shared\inc;$ToolsetDir\sdpublic\shared\inc\minwin;$ToolsetDir\sdpublic\sdk\inc\ucrt;$ToolsetDir\sdpublic\sdk\inc\minwin;$ToolsetDir\sdpublic\sdk\inc\mincore;$ToolsetDir\sdpublic\sdk\inc\abi;$ToolsetDir\sdpublic\sdk\inc\clientcore;$ToolsetDir\diasdk\include";
|
||||
}
|
||||
|
||||
# No use in specifying a RID if the current and target architecture are equivalent.
|
||||
if($TargetArch -eq "x86" -and $Architecture -ne "x86")
|
||||
{
|
||||
$env:TARGETRID = "win7-x86";
|
||||
}
|
||||
if($TargetArch -eq "x64" -and $Architecture -ne "x64")
|
||||
{
|
||||
$env:TARGETRID = "win7-x64";
|
||||
}
|
||||
if($TargetArch -eq "arm")
|
||||
{
|
||||
$env:TARGETRID = "win8-arm";
|
||||
}
|
||||
|
||||
if($NoPackage)
|
||||
{
|
||||
$env:DOTNET_BUILD_SKIP_PACKAGING=1
|
||||
}
|
||||
else
|
||||
{
|
||||
$env:DOTNET_BUILD_SKIP_PACKAGING=0
|
||||
}
|
||||
|
||||
if($Portable)
|
||||
{
|
||||
$env:DOTNET_BUILD_LINK_PORTABLE=1
|
||||
}
|
||||
else
|
||||
{
|
||||
$env:DOTNET_BUILD_LINK_PORTABLE=0
|
||||
}
|
||||
|
||||
# Load Branch Info
|
||||
cat "$RepoRoot\branchinfo.txt" | ForEach-Object {
|
||||
if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) {
|
||||
$splat = $_.Split([char[]]@("="), 2)
|
||||
Set-Content "env:\$($splat[0])" -Value $splat[1]
|
||||
}
|
||||
}
|
||||
|
||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||
if (!$env:DOTNET_INSTALL_DIR)
|
||||
{
|
||||
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\Windows\$Architecture"
|
||||
}
|
||||
|
||||
if (!(Test-Path $env:DOTNET_INSTALL_DIR))
|
||||
{
|
||||
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
|
||||
}
|
||||
|
||||
if (!(Test-Path "$RepoRoot\artifacts"))
|
||||
{
|
||||
mkdir "$RepoRoot\artifacts" | Out-Null
|
||||
}
|
||||
|
||||
# Install a stage 0
|
||||
$DOTNET_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1"
|
||||
Invoke-WebRequest $DOTNET_INSTALL_SCRIPT_URL -OutFile "$RepoRoot\artifacts\dotnet-install.ps1"
|
||||
|
||||
& "$RepoRoot\artifacts\dotnet-install.ps1" -Version 1.0.0-preview3-003886 -Architecture $Architecture -Verbose
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
|
||||
|
||||
# Put the stage0 on the path
|
||||
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
||||
|
||||
# Disable first run since we want to control all package sources
|
||||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
|
||||
# Figure out the RID of the current platform, based on what stage 0 thinks.
|
||||
$HOST_RID=(dotnet --info | Select-String -Pattern "\s*RID:\s*(?<rid>.*)").Matches[0].Groups['rid'].Value
|
||||
|
||||
# Restore the build scripts
|
||||
Write-Host "Restoring Build Script projects..."
|
||||
pushd "$PSScriptRoot\.."
|
||||
|
||||
(Get-Content "dotnet-host-build\project.json.template").Replace("{RID}", $HOST_RID) | Set-Content "dotnet-host-build\project.json"
|
||||
(Get-Content "update-dependencies\project.json.template").Replace("{RID}", $HOST_RID) | Set-Content "update-dependencies\project.json"
|
||||
|
||||
dotnet restore
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
|
||||
popd
|
||||
|
||||
# Publish the builder
|
||||
Write-Host "Compiling Build Scripts..."
|
||||
dotnet publish "$PSScriptRoot" -o "$PSScriptRoot\bin" --framework netcoreapp1.0
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to compile build scripts" }
|
||||
|
||||
# Run the builder
|
||||
Write-Host "Invoking Build Scripts..."
|
||||
Write-Host " Configuration: $env:CONFIGURATION"
|
||||
& "$PSScriptRoot\bin\dotnet-host-build.exe" -t @Targets -e @EnvVars
|
||||
if($LASTEXITCODE -ne 0) { throw "Build failed" }
|
|
@ -1,184 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
OLDPATH="$PATH"
|
||||
|
||||
REPOROOT="$DIR/../.."
|
||||
source "$REPOROOT/scripts/common/_prettyprint.sh"
|
||||
|
||||
__BuildDriverOnly=0
|
||||
|
||||
# Use uname to determine what the OS is.
|
||||
OSName=$(uname -s)
|
||||
case $OSName in
|
||||
Linux)
|
||||
__BuildOS=Linux
|
||||
__HostOS=Linux
|
||||
;;
|
||||
|
||||
Darwin)
|
||||
__BuildOS=OSX
|
||||
__HostOS=OSX
|
||||
;;
|
||||
|
||||
FreeBSD)
|
||||
__BuildOS=FreeBSD
|
||||
__HostOS=FreeBSD
|
||||
;;
|
||||
|
||||
OpenBSD)
|
||||
__BuildOS=OpenBSD
|
||||
__HostOS=OpenBSD
|
||||
;;
|
||||
|
||||
NetBSD)
|
||||
__BuildOS=NetBSD
|
||||
__HostOS=NetBSD
|
||||
;;
|
||||
|
||||
SunOS)
|
||||
__BuildOS=SunOS
|
||||
__HostOS=SunOS
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unsupported OS $OSName detected, configuring as if for Linux"
|
||||
__BuildOS=Linux
|
||||
__HostOS=Linux
|
||||
;;
|
||||
esac
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
-c|--configuration)
|
||||
export CONFIGURATION=$2
|
||||
shift
|
||||
;;
|
||||
--targets)
|
||||
IFS=',' read -r -a targets <<< $2
|
||||
shift
|
||||
;;
|
||||
--env-vars)
|
||||
IFS=',' read -r -a envVars <<< $2
|
||||
shift
|
||||
;;
|
||||
--skiptests)
|
||||
export DOTNET_BUILD_SKIP_TESTS=1
|
||||
;;
|
||||
--nopackage)
|
||||
export DOTNET_BUILD_SKIP_PACKAGING=1
|
||||
;;
|
||||
-portable)
|
||||
export DOTNET_BUILD_LINK_PORTABLE=1
|
||||
;;
|
||||
--skip-prereqs)
|
||||
# Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems
|
||||
export DOTNET_INSTALL_SKIP_PREREQS=1
|
||||
;;
|
||||
--skip-deb-package-build)
|
||||
export DOTNET_BUILD_SKIP_DEB_PACKAGING=1
|
||||
;;
|
||||
--build-driver-only)
|
||||
__BuildDriverOnly=1
|
||||
;;
|
||||
--verbose)
|
||||
export DOTNET_BUILD_VERBOSE=1
|
||||
;;
|
||||
--help)
|
||||
echo "Usage: $0 [--configuration <CONFIGURATION>] [--skip-prereqs] [--nopackage] [--docker <IMAGENAME>] [--help] [--targets <TARGETS...>]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --configuration <CONFIGURATION> Build the specified Configuration (Debug or Release, default: Debug)"
|
||||
echo " --targets <TARGETS...> Comma separated build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
|
||||
echo " --env-vars <'V1=val1','V2=val2'...> Comma separated list of environment variables"
|
||||
echo " --nopackage Skip packaging targets"
|
||||
echo " --skip-prereqs Skip checks for pre-reqs in dotnet_install"
|
||||
echo " --build-driver-only Just build dotnet-host-build binary"
|
||||
echo " -portable Optional argument to build portable platform packages."
|
||||
echo " --docker <IMAGENAME> Build in Docker using the Dockerfile located in scripts/docker/IMAGENAME"
|
||||
echo " --help Display this help message"
|
||||
echo " <TARGETS...> The build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
# Set nuget package cache under the repo
|
||||
export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
|
||||
|
||||
# Load Branch Info
|
||||
while read line; do
|
||||
if [[ $line != \#* ]]; then
|
||||
IFS='=' read -ra splat <<< "$line"
|
||||
export ${splat[0]}="${splat[1]}"
|
||||
fi
|
||||
done < "$REPOROOT/branchinfo.txt"
|
||||
|
||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$(uname)
|
||||
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
|
||||
|
||||
DOTNET_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh"
|
||||
curl -sSL "$DOTNET_INSTALL_SCRIPT_URL" | bash /dev/stdin --version 1.0.0-preview3-003886 --verbose
|
||||
|
||||
# Put stage 0 on the PATH (for this shell only)
|
||||
PATH="$DOTNET_INSTALL_DIR:$PATH"
|
||||
|
||||
# Figure out the RID of the current platform, based on what stage 0 thinks.
|
||||
RID=$(dotnet --info | grep 'RID:' | sed -e 's/[[:space:]]*RID:[[:space:]]*\(.*\)/\1/g')
|
||||
|
||||
# Increases the file descriptors limit for this bash. It prevents an issue we were hitting during restore
|
||||
FILE_DESCRIPTOR_LIMIT=$( ulimit -n )
|
||||
if [ $FILE_DESCRIPTOR_LIMIT -lt 1024 ]
|
||||
then
|
||||
echo "Increasing file description limit to 1024"
|
||||
ulimit -n 1024
|
||||
fi
|
||||
|
||||
# Disable first run since we want to control all package sources
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
|
||||
# Restore the build scripts
|
||||
echo "Restoring Build Script projects..."
|
||||
(
|
||||
cd "$DIR/.."
|
||||
sed -e "s/{RID}/$RID/g" "dotnet-host-build/project.json.template" > "dotnet-host-build/project.json"
|
||||
sed -e "s/{RID}/$RID/g" "update-dependencies/project.json.template" > "update-dependencies/project.json"
|
||||
|
||||
dotnet restore --disable-parallel
|
||||
)
|
||||
|
||||
# Build the builder
|
||||
echo "Compiling Build Scripts..."
|
||||
dotnet publish "$DIR" -o "$DIR/bin" --framework netcoreapp1.0
|
||||
|
||||
if [ $__BuildDriverOnly == 1 ]; then
|
||||
echo "Skipping invoking build scripts."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export PATH="$OLDPATH"
|
||||
# Run the builder
|
||||
echo "Invoking Build Scripts..."
|
||||
echo "Configuration: $CONFIGURATION"
|
||||
|
||||
$DIR/bin/dotnet-host-build -t ${targets[@]} -e ${envVars[@]}
|
||||
exit $?
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>1dbb7542-0345-4f4b-a84b-3b00b185d416</ProjectGuid>
|
||||
<RootNamespace>Microsoft.DotNet.Cli.Build</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"description": "Build scripts for dotnet-cli",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.6.1-beta-24506-02",
|
||||
"Microsoft.NETCore.Runtime.CoreCLR": "1.1.0-beta-24507-05",
|
||||
"Microsoft.CSharp": "4.0.1",
|
||||
"System.Dynamic.Runtime": "4.0.11",
|
||||
"System.Reflection.Metadata": "1.3.0",
|
||||
"System.Runtime.Serialization.Primitives": "4.1.1",
|
||||
"System.Threading.Thread": "4.0.0",
|
||||
"System.Xml.XmlSerializer": "4.0.11",
|
||||
"WindowsAzure.Storage": "8.1.1",
|
||||
"NuGet.CommandLine.XPlat": "4.0.0-rc3-2140",
|
||||
"Microsoft.DotNet.Cli.Build.Framework": {
|
||||
"target": "project"
|
||||
},
|
||||
"shared-build-targets-utils": {
|
||||
"target": "project"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": [
|
||||
"dnxcore50",
|
||||
"portable-net45+win8"
|
||||
]
|
||||
}
|
||||
},
|
||||
"runtimes": {
|
||||
"{RID}": {}
|
||||
}
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class BuildVersion : Version
|
||||
{
|
||||
public string SimpleVersion => $"{Major}.{Minor}.{Patch}.{CommitCountString}";
|
||||
public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}";
|
||||
public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}";
|
||||
public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}-00";
|
||||
public string ProductionVersion => $"{Major}.{Minor}.{Patch}";
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public static class GitUtils
|
||||
{
|
||||
public static int GetCommitCount()
|
||||
{
|
||||
return int.Parse(ExecuteGitCommand("rev-list", "--count", "HEAD"));
|
||||
}
|
||||
|
||||
public static string GetCommitHash()
|
||||
{
|
||||
return ExecuteGitCommand("rev-parse", "HEAD");
|
||||
}
|
||||
|
||||
private static string ExecuteGitCommand(params string[] args)
|
||||
{
|
||||
var gitResult = Cmd("git", args)
|
||||
.CaptureStdOut()
|
||||
.Execute();
|
||||
gitResult.EnsureSuccessful();
|
||||
|
||||
return gitResult.StdOut.Trim();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class HostVersion : Version
|
||||
{
|
||||
// ------------------------------------------HOST-VERSIONING-------------------------------------------
|
||||
//
|
||||
// Host versions are independent of CLI versions. Moreover, these version numbers
|
||||
// are baked into the binary and is used to look up a serviced binary replacement.
|
||||
//
|
||||
|
||||
public struct VerInfo
|
||||
{
|
||||
public int Major;
|
||||
public int Minor;
|
||||
public int Patch;
|
||||
public string Release;
|
||||
public string BuildMajor;
|
||||
public string BuildMinor;
|
||||
public string CommitCountString;
|
||||
|
||||
public VerInfo(int major, int minor, int patch, string release, string buildMajor, string buildMinor, string commitCountString)
|
||||
{
|
||||
Major = major;
|
||||
Minor = minor;
|
||||
Patch = patch;
|
||||
Release = release;
|
||||
BuildMajor = buildMajor;
|
||||
BuildMinor = buildMinor;
|
||||
CommitCountString = commitCountString;
|
||||
}
|
||||
|
||||
public string GenerateMsiVersion()
|
||||
{
|
||||
return Version.GenerateMsiVersion(Major, Minor, Patch, Int32.Parse(VerRsrcBuildMajor));
|
||||
}
|
||||
|
||||
public string WithoutSuffix => $"{Major}.{Minor}.{Patch}";
|
||||
|
||||
// The version numbers to be included in the embedded version resource (.rc) files.
|
||||
public string VerRsrcBuildMajor => !string.IsNullOrEmpty(BuildMajor) ? BuildMajor : CommitCountString;
|
||||
public string VerRsrcBuildMinor => !string.IsNullOrEmpty(BuildMinor) ? BuildMinor : "00";
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string suffix = "";
|
||||
foreach (var verPad in new string[] { Release, BuildMajor, BuildMinor })
|
||||
{
|
||||
if (!string.IsNullOrEmpty(verPad))
|
||||
{
|
||||
suffix += $"-{verPad}";
|
||||
}
|
||||
}
|
||||
return $"{Major}.{Minor}.{Patch}{suffix}";
|
||||
}
|
||||
}
|
||||
//
|
||||
// Latest hosts for production of nupkgs.
|
||||
//
|
||||
|
||||
// Full versions and package information.
|
||||
public string LatestHostBuildMajor => CommitCountString;
|
||||
public string LatestHostBuildMinor => "00";
|
||||
public bool EnsureStableVersion { get; set; }
|
||||
public VerInfo LatestHostVersion => new VerInfo(Major, Minor, Patch, ReleaseSuffix, LatestHostBuildMajor, LatestHostBuildMinor, CommitCountString);
|
||||
public VerInfo LatestAppHostVersion => new VerInfo(Major, Minor, Patch, ReleaseSuffix, LatestHostBuildMajor, LatestHostBuildMinor, CommitCountString);
|
||||
public VerInfo LatestHostFxrVersion => new VerInfo(Major, Minor, Patch, ReleaseSuffix, LatestHostBuildMajor, LatestHostBuildMinor, CommitCountString);
|
||||
public VerInfo LatestHostPolicyVersion => new VerInfo(Major, Minor, Patch, ReleaseSuffix, LatestHostBuildMajor, LatestHostBuildMinor, CommitCountString);
|
||||
public Dictionary<string, VerInfo> LatestHostPackages => new Dictionary<string, VerInfo>()
|
||||
{
|
||||
{ "Microsoft.NETCore.DotNetHost", LatestHostVersion },
|
||||
{ "Microsoft.NETCore.DotNetAppHost", LatestAppHostVersion },
|
||||
{ "Microsoft.NETCore.DotNetHostResolver", LatestHostFxrVersion },
|
||||
{ "Microsoft.NETCore.DotNetHostPolicy", LatestHostPolicyVersion }
|
||||
};
|
||||
public Dictionary<string, VerInfo> LatestHostPackagesToValidate => new Dictionary<string, VerInfo>()
|
||||
{
|
||||
{ "Microsoft.NETCore.DotNetHost", LatestHostVersion },
|
||||
{ "Microsoft.NETCore.DotNetAppHost", LatestAppHostVersion },
|
||||
{ "Microsoft.NETCore.DotNetHostResolver", LatestHostFxrVersion },
|
||||
{ "Microsoft.NETCore.DotNetHostPolicy", LatestHostPolicyVersion }
|
||||
};
|
||||
public Dictionary<string, VerInfo> LatestHostBinaries => new Dictionary<string, VerInfo>()
|
||||
{
|
||||
{ "dotnet", LatestHostVersion },
|
||||
{ "apphost", LatestAppHostVersion },
|
||||
{ "hostfxr", LatestHostFxrVersion },
|
||||
{ "hostpolicy", LatestHostPolicyVersion }
|
||||
};
|
||||
|
||||
//
|
||||
// Locked muxer for consumption in CLI.
|
||||
//
|
||||
// Set this variable to toggle muxer locking.
|
||||
public bool IsLocked { get; set; }
|
||||
public VerInfo LockedHostFxrVersion => IsLocked ? new VerInfo(Major, Minor, Patch, "", "", "", CommitCountString) : LatestHostFxrVersion;
|
||||
public VerInfo LockedHostVersion => IsLocked ? new VerInfo(Major, Minor, Patch, "", "", "", CommitCountString) : LatestHostVersion;
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public abstract class Version
|
||||
{
|
||||
public virtual int Major { get; set; }
|
||||
public virtual int Minor { get; set; }
|
||||
public virtual int Patch { get; set; }
|
||||
public virtual int CommitCount { get; set; }
|
||||
public virtual string CommitCountString => CommitCount.ToString("000000");
|
||||
public virtual string ReleaseSuffix { get; set; }
|
||||
|
||||
public string GenerateMsiVersion()
|
||||
{
|
||||
return GenerateMsiVersion(Major, Minor, Patch, CommitCount);
|
||||
}
|
||||
|
||||
public static string GenerateMsiVersion(int Major, int Minor, int Patch, int CommitCount)
|
||||
{
|
||||
// MSI versioning
|
||||
// Encode the CLI version to fit into the MSI versioning scheme - https://msdn.microsoft.com/en-us/library/windows/desktop/aa370859(v=vs.85).aspx
|
||||
// MSI versions are 3 part
|
||||
// major.minor.build
|
||||
// Size(bits) of each part 8 8 16
|
||||
// So we have 32 bits to encode the CLI version
|
||||
// Starting with most significant bit this how the CLI version is going to be encoded as MSI Version
|
||||
// CLI major -> 6 bits
|
||||
// CLI minor -> 6 bits
|
||||
// CLI patch -> 6 bits
|
||||
// CLI commitcount -> 14 bits
|
||||
var major = Major << 26;
|
||||
var minor = Minor << 20;
|
||||
var patch = Patch << 14;
|
||||
var msiVersionNumber = major | minor | patch | CommitCount;
|
||||
|
||||
var msiMajor = (msiVersionNumber >> 24) & 0xFF;
|
||||
var msiMinor = (msiVersionNumber >> 16) & 0xFF;
|
||||
var msiBuild = msiVersionNumber & 0xFFFF;
|
||||
|
||||
return $"{msiMajor}.{msiMinor}.{msiBuild}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.DotNet.Cli.Build;
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
|
||||
namespace Microsoft.DotNet.Scripts
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds the configuration information for the update-dependencies script.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The following Environment Variables are required by this script:
|
||||
///
|
||||
/// GITHUB_USER - The user to commit the changes as.
|
||||
/// GITHUB_EMAIL - The user's email to commit the changes as.
|
||||
/// GITHUB_PASSWORD - The password/personal access token of the GitHub user.
|
||||
///
|
||||
/// The following Environment Variables can optionally be specified:
|
||||
///
|
||||
/// COREFX_VERSION_URL - The Url to get the current CoreFx version. (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/corefx/master/")
|
||||
/// CORECLR_VERSION_URL - The Url to get the current CoreCLR version. (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/coreclr/master/")
|
||||
/// GITHUB_ORIGIN_OWNER - The owner of the GitHub fork to push the commit and create the PR from. (ex. "dotnet-bot")
|
||||
/// GITHUB_UPSTREAM_OWNER - The owner of the GitHub base repo to create the PR to. (ex. "dotnet")
|
||||
/// GITHUB_PROJECT - The repo name under the ORIGIN and UPSTREAM owners. (ex. "cli")
|
||||
/// GITHUB_UPSTREAM_BRANCH - The branch in the GitHub base repo to create the PR to. (ex. "rel/1.0.0")
|
||||
/// GITHUB_PULL_REQUEST_NOTIFICATIONS - A semi-colon ';' separated list of GitHub users to notify on the PR.
|
||||
/// </remarks>
|
||||
public class Config
|
||||
{
|
||||
public static Config Instance { get; } = new Config();
|
||||
|
||||
private static BranchInfo s_branchInfo = new BranchInfo(Dirs.RepoRoot);
|
||||
|
||||
private Lazy<string> _userName = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_USER"));
|
||||
private Lazy<string> _email = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_EMAIL"));
|
||||
private Lazy<string> _password = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PASSWORD"));
|
||||
private Lazy<string> _coreFxVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("COREFX_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/corefx/master/"));
|
||||
private Lazy<string> _coreClrVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("CORECLR_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/coreclr/master/"));
|
||||
private Lazy<string> _standardVersionUrl = new Lazy<string>(() => GetEnvironmentVariable("STANDARD_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/standard/master/"));
|
||||
private Lazy<string> _gitHubOriginOwner;
|
||||
private Lazy<string> _gitHubUpstreamOwner = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet"));
|
||||
private Lazy<string> _gitHubProject = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_PROJECT", "core-setup"));
|
||||
private Lazy<string> _gitHubUpstreamBranch = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", s_branchInfo.Entries["BRANCH_NAME"]));
|
||||
private Lazy<string[]> _gitHubPullRequestNotifications = new Lazy<string[]>(() =>
|
||||
GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "")
|
||||
.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries));
|
||||
|
||||
private Config()
|
||||
{
|
||||
_gitHubOriginOwner = new Lazy<string>(() => GetEnvironmentVariable("GITHUB_ORIGIN_OWNER", UserName));
|
||||
}
|
||||
|
||||
public string UserName => _userName.Value;
|
||||
public string Email => _email.Value;
|
||||
public string Password => _password.Value;
|
||||
public string CoreFxVersionUrl => _coreFxVersionUrl.Value;
|
||||
public string CoreClrVersionUrl => _coreClrVersionUrl.Value;
|
||||
public string StandardVersionUrl => _standardVersionUrl.Value;
|
||||
public string GitHubOriginOwner => _gitHubOriginOwner.Value;
|
||||
public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value;
|
||||
public string GitHubProject => _gitHubProject.Value;
|
||||
public string GitHubUpstreamBranch => _gitHubUpstreamBranch.Value;
|
||||
public string[] GitHubPullRequestNotifications => _gitHubPullRequestNotifications.Value;
|
||||
|
||||
private static string GetEnvironmentVariable(string name, string defaultValue = null)
|
||||
{
|
||||
string value = Environment.GetEnvironmentVariable(name);
|
||||
if (value == null)
|
||||
{
|
||||
value = defaultValue;
|
||||
}
|
||||
|
||||
if (value == null)
|
||||
{
|
||||
throw new InvalidOperationException($"Can't find environment variable '{name}'.");
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.DotNet.Scripts
|
||||
{
|
||||
public static class Dirs
|
||||
{
|
||||
public static readonly string RepoRoot = Directory.GetCurrentDirectory();
|
||||
public static readonly string Pkg = Path.Combine(RepoRoot, "pkg");
|
||||
public static readonly string PkgProjects = Path.Combine(Pkg, "projects");
|
||||
public static readonly string PkgDeps = Path.Combine(Pkg, "deps");
|
||||
}
|
||||
}
|
|
@ -1,201 +0,0 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
using Microsoft.DotNet.VersionTools;
|
||||
using Microsoft.DotNet.VersionTools.Automation;
|
||||
using Microsoft.DotNet.VersionTools.Dependencies;
|
||||
using NuGet.Versioning;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.DotNet.Scripts
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
private static readonly Config s_config = Config.Instance;
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
DebugHelper.HandleDebugSwitch(ref args);
|
||||
|
||||
bool onlyUpdate;
|
||||
ParseArgs(args, out onlyUpdate);
|
||||
|
||||
List<BuildInfo> buildInfos = new List<BuildInfo>();
|
||||
|
||||
buildInfos.Add(GetBuildInfo("CoreFx", s_config.CoreFxVersionUrl, fetchLatestReleaseFile: false));
|
||||
buildInfos.Add(GetBuildInfo("CoreClr", s_config.CoreClrVersionUrl, fetchLatestReleaseFile: false));
|
||||
buildInfos.Add(GetBuildInfo("Standard", s_config.StandardVersionUrl, fetchLatestReleaseFile: false));
|
||||
|
||||
IEnumerable<IDependencyUpdater> updaters = GetUpdaters();
|
||||
var dependencyBuildInfos = buildInfos.Select(buildInfo =>
|
||||
new DependencyBuildInfo(
|
||||
buildInfo,
|
||||
upgradeStableVersions: true,
|
||||
disabledPackages: Enumerable.Empty<string>()));
|
||||
DependencyUpdateResults updateResults = DependencyUpdateUtils.Update(updaters, dependencyBuildInfos);
|
||||
|
||||
if (!onlyUpdate && updateResults.ChangesDetected())
|
||||
{
|
||||
GitHubAuth gitHubAuth = new GitHubAuth(s_config.Password, s_config.UserName, s_config.Email);
|
||||
GitHubProject origin = new GitHubProject(s_config.GitHubProject, s_config.UserName);
|
||||
GitHubBranch upstreamBranch = new GitHubBranch(
|
||||
s_config.GitHubUpstreamBranch,
|
||||
new GitHubProject(s_config.GitHubProject, s_config.GitHubUpstreamOwner));
|
||||
|
||||
string suggestedMessage = updateResults.GetSuggestedCommitMessage();
|
||||
string body = string.Empty;
|
||||
if (s_config.GitHubPullRequestNotifications.Any())
|
||||
{
|
||||
body += PullRequestCreator.NotificationString(s_config.GitHubPullRequestNotifications);
|
||||
}
|
||||
|
||||
new PullRequestCreator(gitHubAuth, origin, upstreamBranch)
|
||||
.CreateOrUpdateAsync(
|
||||
suggestedMessage,
|
||||
suggestedMessage + $" ({upstreamBranch.Name})",
|
||||
body)
|
||||
.Wait();
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ParseArgs(string[] args, out bool updateOnly)
|
||||
{
|
||||
updateOnly = false;
|
||||
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
{
|
||||
if (string.Equals(args[i], "--update", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
updateOnly = true;
|
||||
}
|
||||
if (args[i] == "-e")
|
||||
{
|
||||
i++;
|
||||
while (i < args.Length && !args[i].StartsWith("-", StringComparison.Ordinal))
|
||||
{
|
||||
int idx = args[i].IndexOf('=');
|
||||
if (idx < 0)
|
||||
{
|
||||
Console.Error.WriteLine($"Unrecognized argument '{args[i]}'");
|
||||
return false;
|
||||
}
|
||||
|
||||
string name = args[i].Substring(0, idx);
|
||||
string value = args[i].Substring(idx + 1);
|
||||
Environment.SetEnvironmentVariable(name, value);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static BuildInfo GetBuildInfo(string name, string packageVersionsUrl, bool fetchLatestReleaseFile = true)
|
||||
{
|
||||
const string FileUrlProtocol = "file://";
|
||||
|
||||
if (packageVersionsUrl.StartsWith(FileUrlProtocol, StringComparison.Ordinal))
|
||||
{
|
||||
return LocalFileGetAsync(
|
||||
name,
|
||||
packageVersionsUrl.Substring(FileUrlProtocol.Length),
|
||||
fetchLatestReleaseFile)
|
||||
.Result;
|
||||
}
|
||||
else
|
||||
{
|
||||
return BuildInfo.Get(name, packageVersionsUrl, fetchLatestReleaseFile);
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task<BuildInfo> LocalFileGetAsync(
|
||||
string name,
|
||||
string path,
|
||||
bool fetchLatestReleaseFile = true)
|
||||
{
|
||||
string latestPackagesPath = Path.Combine(path, BuildInfo.LatestPackagesTxtFilename);
|
||||
using (var packageFileStream = File.OpenRead(latestPackagesPath))
|
||||
using (var packageReader = new StreamReader(packageFileStream))
|
||||
{
|
||||
Dictionary<string, string> packages = await BuildInfo.ReadPackageListAsync(packageReader);
|
||||
|
||||
string latestReleaseVersion;
|
||||
if (fetchLatestReleaseFile)
|
||||
{
|
||||
string latestReleasePath = Path.Combine(path, BuildInfo.LatestTxtFilename);
|
||||
latestReleaseVersion = File.ReadLines(latestReleasePath).First().Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
latestReleaseVersion = FindLatestReleaseFromPackages(packages);
|
||||
}
|
||||
|
||||
return new BuildInfo
|
||||
{
|
||||
Name = name,
|
||||
LatestPackages = packages,
|
||||
LatestReleaseVersion = latestReleaseVersion
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private static string FindLatestReleaseFromPackages(IDictionary<string, string> packages)
|
||||
{
|
||||
IEnumerable<NuGetVersion> versions = packages.Values
|
||||
.Select(versionString => new NuGetVersion(versionString));
|
||||
|
||||
return
|
||||
versions.FirstOrDefault(v => v.IsPrerelease)?.Release ??
|
||||
// if there are no prerelease versions, just grab the first version
|
||||
versions.FirstOrDefault()?.ToNormalizedString();
|
||||
}
|
||||
|
||||
private static IEnumerable<IDependencyUpdater> GetUpdaters()
|
||||
{
|
||||
yield return CreateProjectJsonUpdater();
|
||||
|
||||
yield return CreateDependencyVersionsUpdater("CoreCLRVersion", "transport.Microsoft.NETCore.Runtime.CoreCLR");
|
||||
yield return CreateDependencyVersionsUpdater("JitVersion", "transport.Microsoft.NETCore.Jit");
|
||||
|
||||
yield return CreateRegexUpdater(Path.Combine("pkg", "dir.props"), new Regex(@"Microsoft\.NETCore\.Platforms\\(?<version>.*)\\runtime\.json"), "Microsoft.NETCore.Platforms");
|
||||
}
|
||||
|
||||
private static IDependencyUpdater CreateProjectJsonUpdater()
|
||||
{
|
||||
var projectJsonFiles = new List<string>
|
||||
{
|
||||
Path.Combine(Dirs.PkgProjects, "Microsoft.NETCore.App", "project.json.template"),
|
||||
Path.Combine(Dirs.PkgProjects, "Microsoft.NETCore.UniversalWindowsPlatform", "project.json.template"),
|
||||
Path.Combine(Dirs.PkgDeps, "project.json")
|
||||
};
|
||||
|
||||
return new ProjectJsonUpdater(projectJsonFiles);
|
||||
}
|
||||
|
||||
private static IDependencyUpdater CreateDependencyVersionsUpdater(string dependencyPropertyName, string packageId)
|
||||
{
|
||||
string dependencyVersionsPath = Path.Combine("build_projects", "shared-build-targets-utils", "DependencyVersions.cs");
|
||||
Regex dependencyVersionsRegex = new Regex($@"{dependencyPropertyName} = ""(?<version>.*)"";");
|
||||
|
||||
return CreateRegexUpdater(dependencyVersionsPath, dependencyVersionsRegex, packageId);
|
||||
}
|
||||
|
||||
private static IDependencyUpdater CreateRegexUpdater(string repoRelativePath, Regex regex, string packageId)
|
||||
{
|
||||
return new FileRegexPackageUpdater()
|
||||
{
|
||||
Path = Path.Combine(Dirs.RepoRoot, repoRelativePath),
|
||||
PackageId = packageId,
|
||||
Regex = regex,
|
||||
VersionGroupName = "version"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"description": "Updates the repos dependencies",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"compile": [
|
||||
"../Microsoft.DotNet.Cli.Build.Framework/DebugHelper.cs",
|
||||
"../shared-build-targets-utils/Utils/BranchInfo.cs"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.6.1-beta-24506-02",
|
||||
"Microsoft.NETCore.Runtime.CoreCLR": "1.1.0-beta-24507-05",
|
||||
"Microsoft.DotNet.VersionTools": "1.0.27-prerelease-01518-03"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": [
|
||||
"dnxcore50",
|
||||
"portable-net45+win"
|
||||
]
|
||||
}
|
||||
},
|
||||
"runtimes": {
|
||||
"{RID}": {}
|
||||
}
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
param(
|
||||
[switch]$Update,
|
||||
[string[]]$EnvVars=@(),
|
||||
[switch]$Help)
|
||||
|
||||
if($Help)
|
||||
{
|
||||
Write-Host "Usage: .\update-dependencies.ps1"
|
||||
Write-Host ""
|
||||
Write-Host "Options:"
|
||||
Write-Host " -Update Update dependencies (but don't open a PR)"
|
||||
Write-Host " -EnvVars <'V1=val1','V2=val2'...> Comma separated list of environment variable name-value pairs"
|
||||
Write-Host " -Help Display this help message"
|
||||
exit 0
|
||||
}
|
||||
|
||||
$Architecture='x64'
|
||||
|
||||
$RepoRoot = "$PSScriptRoot\..\.."
|
||||
$ProjectArgs = ""
|
||||
|
||||
if ($Update)
|
||||
{
|
||||
$ProjectArgs = "--update"
|
||||
}
|
||||
|
||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||
if (!$env:DOTNET_INSTALL_DIR)
|
||||
{
|
||||
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\Windows\$Architecture"
|
||||
}
|
||||
|
||||
if (!(Test-Path $env:DOTNET_INSTALL_DIR))
|
||||
{
|
||||
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
|
||||
}
|
||||
|
||||
if (!(Test-Path "$RepoRoot\artifacts"))
|
||||
{
|
||||
mkdir "$RepoRoot\artifacts" | Out-Null
|
||||
}
|
||||
|
||||
# Install a stage 0
|
||||
$DOTNET_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1"
|
||||
Invoke-WebRequest $DOTNET_INSTALL_SCRIPT_URL -OutFile "$RepoRoot\artifacts\dotnet-install.ps1"
|
||||
|
||||
& "$RepoRoot\artifacts\dotnet-install.ps1" -Version 1.0.0-preview3-003886 -Architecture $Architecture -Verbose
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
|
||||
|
||||
# Put the stage0 on the path
|
||||
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
||||
|
||||
$appPath = "$PSScriptRoot"
|
||||
|
||||
# Figure out the RID of the current platform, based on what stage 0 thinks.
|
||||
$HOST_RID=(dotnet --info | Select-String -Pattern "\s*RID:\s*(?<rid>.*)").Matches[0].Groups['rid'].Value
|
||||
|
||||
# Restore the build scripts
|
||||
Write-Host "Restoring Build Script projects..."
|
||||
pushd "$PSScriptRoot\.."
|
||||
|
||||
(Get-Content "dotnet-host-build\project.json.template").Replace("{RID}", $HOST_RID) | Set-Content "dotnet-host-build\project.json"
|
||||
(Get-Content "update-dependencies\project.json.template").Replace("{RID}", $HOST_RID) | Set-Content "update-dependencies\project.json"
|
||||
|
||||
dotnet restore
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
|
||||
popd
|
||||
|
||||
# Publish the app
|
||||
Write-Host "Compiling App $appPath..."
|
||||
dotnet publish "$appPath" -o "$appPath\bin" --framework netcoreapp1.0
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to compile build scripts" }
|
||||
|
||||
# Run the app
|
||||
Write-Host "Invoking App $appPath..."
|
||||
Write-Host " Configuration: $env:CONFIGURATION"
|
||||
& "$appPath\bin\update-dependencies.exe" $ProjectArgs -e @EnvVars
|
||||
if($LASTEXITCODE -ne 0) { throw "Build failed" }
|
|
@ -1,97 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
OLDPATH="$PATH"
|
||||
|
||||
REPOROOT="$DIR/../.."
|
||||
PROJECTARGS=""
|
||||
source "$REPOROOT/scripts/common/_prettyprint.sh"
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
--update)
|
||||
PROJECTARGS="--update"
|
||||
;;
|
||||
--env-vars)
|
||||
IFS=',' read -r -a envVars <<< $2
|
||||
shift
|
||||
;;
|
||||
--help)
|
||||
echo "Usage: $0"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --update Update dependencies (but don't open a PR)"
|
||||
echo " --env-vars <'V1=val1','V2=val2'...> Comma separated list of environment variable name value-pairs"
|
||||
echo " --help Display this help message"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
done
|
||||
|
||||
# Set nuget package cache under the repo
|
||||
export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
|
||||
|
||||
# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot
|
||||
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$(uname)
|
||||
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
|
||||
|
||||
DOTNET_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh"
|
||||
curl -sSL "$DOTNET_INSTALL_SCRIPT_URL" | bash /dev/stdin --version 1.0.0-preview3-003886 --verbose
|
||||
|
||||
# Put stage 0 on the PATH (for this shell only)
|
||||
PATH="$DOTNET_INSTALL_DIR:$PATH"
|
||||
|
||||
# Figure out the RID of the current platform, based on what stage 0 thinks.
|
||||
RID=$(dotnet --info | grep 'RID:' | sed -e 's/[[:space:]]*RID:[[:space:]]*\(.*\)/\1/g')
|
||||
|
||||
# Increases the file descriptors limit for this bash. It prevents an issue we were hitting during restore
|
||||
FILE_DESCRIPTOR_LIMIT=$( ulimit -n )
|
||||
if [ $FILE_DESCRIPTOR_LIMIT -lt 1024 ]
|
||||
then
|
||||
echo "Increasing file description limit to 1024"
|
||||
ulimit -n 1024
|
||||
fi
|
||||
|
||||
# Disable first run since we want to control all package sources
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
|
||||
# Restore the build scripts
|
||||
echo "Restoring Build Script projects..."
|
||||
(
|
||||
pushd "$DIR/.."
|
||||
sed -e "s/{RID}/$RID/g" "dotnet-host-build/project.json.template" > "dotnet-host-build/project.json"
|
||||
sed -e "s/{RID}/$RID/g" "update-dependencies/project.json.template" > "update-dependencies/project.json"
|
||||
|
||||
dotnet restore --disable-parallel
|
||||
popd
|
||||
)
|
||||
|
||||
# Build the builder
|
||||
echo "Compiling Build Scripts..."
|
||||
dotnet publish "$DIR" -o "$DIR/bin" --framework netcoreapp1.0
|
||||
|
||||
export PATH="$OLDPATH"
|
||||
# Run the builder
|
||||
echo "Invoking Build Scripts..."
|
||||
echo "Configuration: $CONFIGURATION"
|
||||
|
||||
$DIR/bin/update-dependencies "$PROJECTARGS" -e ${envVars[@]}
|
||||
exit $?
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>a28bd8ac-df15-4f58-8299-98a9ae2b8726</ProjectGuid>
|
||||
<RootNamespace>Microsoft.DotNet.Scripts</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
|
@ -0,0 +1,446 @@
|
|||
{
|
||||
"build": [
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Cleanup previous build",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "sudo",
|
||||
"arguments": "rm -dfr $(PB_SourcesDirectory)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Clone repo",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "clone $(PB_VsoRepoUrl) $(PB_SourcesDirectory)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "git checkout",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "checkout $(SourceVersion)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Create host machine tools sandbox",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c",
|
||||
"versionSpec": "2.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"SourceFolder": "$(PB_SourcesDirectory)",
|
||||
"Contents": "init-tools.sh\nBuildToolsVersion.txt\nDotnetCLIVersion.txt",
|
||||
"TargetFolder": "$(PB_DockerHost_Sandbox)",
|
||||
"CleanTargetFolder": "false",
|
||||
"OverWrite": "false",
|
||||
"flattenFolders": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Initialize tools in sandbox for host machine",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_DockerHost_Sandbox)/init-tools.sh",
|
||||
"arguments": "",
|
||||
"workingFolder": "$(PB_DockerHost_Sandbox)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Initialize docker",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_DockerHost_ToolsDirectory)/scripts/docker/init-docker.sh",
|
||||
"arguments": "$(PB_DockerImageName)",
|
||||
"workingFolder": "$(PB_DockerHost_Sandbox)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Init tools",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "docker",
|
||||
"arguments": "run --rm $(DockerCommonRunArgs) $(PB_GitDirectory)/init-tools.sh",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Generate version assets",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "docker",
|
||||
"arguments": "run --rm $(DockerCommonRunArgs) $(PB_GitDirectory)/Tools/msbuild.sh $(PB_GitDirectory)/build.proj /t:GenerateVersionSourceFile /p:GenerateVersionSourceFile=true /p:OfficialBuildId=$(OfficialBuildId)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Build",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "docker",
|
||||
"arguments": "run --rm $(DockerCommonRunArgs) $(PB_GitDirectory)/build.sh -OfficialBuildId=$(OfficialBuildId) $(PB_BuildArguments)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Publish",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "docker",
|
||||
"arguments": "run --rm $(DockerCommonRunArgs) $(PB_GitDirectory)/Tools/msbuild.sh $(PB_GitDirectory)/publish/publish.proj /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:DistroRid=$(PB_DistroRid) /p:TargetArchitecture=$(PB_TargetArchitecture) /p:ConfigurationGroup=$(BuildConfiguration)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Cleanup Docker",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "perl",
|
||||
"arguments": "$(PB_DockerHost_ToolsDirectory)/scripts/docker/cleanup-docker.sh",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Copy Publish Artifact: Build Logs",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "1d341bb0-2106-458c-8422-d00bcea6512a",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"CopyRoot": "",
|
||||
"Contents": "**/*.log",
|
||||
"ArtifactName": "Build Logs",
|
||||
"ArtifactType": "Container",
|
||||
"TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Cleanup VSTS Agent",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_DockerHost_ToolsDirectory)/msbuild.sh",
|
||||
"arguments": "$(PB_DockerHost_ToolsDirectory)/scripts/vstsagent/cleanupagent.proj /p:AgentDirectory=$(Agent.HomeDirectory) /p:DoClean=$(PB_CleanAgent)",
|
||||
"workingFolder": "$(DockerHost_ToolsDirectory)/scripts/vstsagent/",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
}
|
||||
],
|
||||
"options": [
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "5bc3cfb7-6b54-4a4b-b5d2-a3905949f8a6"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "7c555368-ca64-4199-add6-9ebaf0b0137d"
|
||||
},
|
||||
"inputs": {
|
||||
"multipliers": "[]",
|
||||
"parallel": "false",
|
||||
"continueOnError": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "a9db38f9-9fdc-478c-b0f9-464221e58316"
|
||||
},
|
||||
"inputs": {
|
||||
"workItemType": "4777",
|
||||
"assignToRequestor": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "57578776-4c22-4526-aeb0-86b6da17ee9c"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"BuildConfiguration": {
|
||||
"value": "Release",
|
||||
"allowOverride": true
|
||||
},
|
||||
"PB_BuildArguments": {
|
||||
"value": "--skip-prereqs --configuration $(BuildConfiguration)",
|
||||
"allowOverride": true
|
||||
},
|
||||
"CONNECTION_STRING": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"PUBLISH_TO_AZURE_BLOB": {
|
||||
"value": "true",
|
||||
"allowOverride": true
|
||||
},
|
||||
"NUGET_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core-dev-eng/api/v2/package"
|
||||
},
|
||||
"NUGET_API_KEY": {
|
||||
"value": null,
|
||||
"isSecret": true
|
||||
},
|
||||
"GITHUB_PASSWORD": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"DOTNET_BUILD_CONTAINER_TAG": {
|
||||
"value": "core-setup-$(PB_DockerOS)-$(Build.BuildId)"
|
||||
},
|
||||
"PB_DockerOS": {
|
||||
"value": "debian8",
|
||||
"allowOverride": true
|
||||
},
|
||||
"PB_CleanAgent": {
|
||||
"value": "true"
|
||||
},
|
||||
"PB_DockerHost_ToolsDirectory": {
|
||||
"value": "$(PB_DockerHost_Sandbox)/Tools"
|
||||
},
|
||||
"NUGET_SYMBOLS_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core-dev-eng/symbols/api/v2/package"
|
||||
},
|
||||
"PB_DockerImageName": {
|
||||
"value": "$(PB_DockerRepository):$(PB_DockerTag)"
|
||||
},
|
||||
"PB_DockerRepository": {
|
||||
"value": "microsoft/dotnet-buildtools-prereqs"
|
||||
},
|
||||
"PB_DockerContainerName": {
|
||||
"value": "coresetup-$(Build.BuildId)"
|
||||
},
|
||||
"PB_DockerTag": {
|
||||
"value": "ubuntu1404_prereqs_v3"
|
||||
},
|
||||
"OfficialBuildId": {
|
||||
"value": "$(Build.BuildNumber)"
|
||||
},
|
||||
"PB_GitDirectory": {
|
||||
"value": "/root/coresetup"
|
||||
},
|
||||
"SourceVersion": {
|
||||
"value": "HEAD"
|
||||
},
|
||||
"DockerCommonRunArgs": {
|
||||
"value": "--name $(PB_DockerContainerName) -v \"$(PB_SourcesDirectory):$(PB_GitDirectory)\" -w=\"$(PB_GitDirectory)\" $(PB_DockerImageName)"
|
||||
},
|
||||
"PB_VsoRepoUrl": {
|
||||
"value": "--branch $(PB_Branch) https://$(PB_VsoAccountName):$(PB_VsoPassword)@devdiv.visualstudio.com/DevDiv/_git/DotNet-Core-Setup-Trusted"
|
||||
},
|
||||
"PB_VsoAccountName": {
|
||||
"value": "dn-bot"
|
||||
},
|
||||
"PB_VsoPassword": {
|
||||
"value": null,
|
||||
"isSecret": true
|
||||
},
|
||||
"PB_SourcesDirectory": {
|
||||
"value": "$(Build.SourcesDirectory)/core-setup"
|
||||
},
|
||||
"PB_Branch": {
|
||||
"value": "buildtools"
|
||||
},
|
||||
"PB_DockerHost_Sandbox": {
|
||||
"value": "$(Build.StagingDirectory)/HostSandbox"
|
||||
},
|
||||
"PB_AzureAccountName": {
|
||||
"value": "sourcebuild"
|
||||
},
|
||||
"PB_AzureAccessToken": {
|
||||
"value": null,
|
||||
"isSecret": true
|
||||
},
|
||||
"PB_DistroRid": {
|
||||
"value": "ubuntu.14.04-x64"
|
||||
},
|
||||
"PB_TargetArchitecture": {
|
||||
"value": "x64"
|
||||
}
|
||||
},
|
||||
"demands": [
|
||||
"Agent.OS -equals linux"
|
||||
],
|
||||
"retentionRules": [
|
||||
{
|
||||
"branches": [
|
||||
"+refs/heads/*"
|
||||
],
|
||||
"artifacts": [],
|
||||
"artifactTypesToDelete": [
|
||||
"FilePath",
|
||||
"SymbolStore"
|
||||
],
|
||||
"daysToKeep": 2,
|
||||
"minimumToKeep": 10,
|
||||
"deleteBuildRecord": true,
|
||||
"deleteTestResults": true
|
||||
}
|
||||
],
|
||||
"buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)-$(PB_DockerTag)",
|
||||
"jobAuthorizationScope": "projectCollection",
|
||||
"jobTimeoutInMinutes": 90,
|
||||
"jobCancelTimeoutInMinutes": 5,
|
||||
"badgeEnabled": true,
|
||||
"repository": {
|
||||
"properties": {
|
||||
"labelSources": "0",
|
||||
"reportBuildStatus": "true",
|
||||
"fetchDepth": "0",
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "true",
|
||||
"cleanOptions": "3"
|
||||
},
|
||||
"id": "c19ea379-feb7-4ca5-8f7f-5f2b5095ea62",
|
||||
"type": "TfsGit",
|
||||
"name": "DotNet-Core-Setup-Trusted",
|
||||
"url": "https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Core-Setup-Trusted",
|
||||
"defaultBranch": "refs/heads/buildtools",
|
||||
"clean": "false",
|
||||
"checkoutSubmodules": false
|
||||
},
|
||||
"processParameters": {},
|
||||
"quality": "definition",
|
||||
"queue": {
|
||||
"id": 36,
|
||||
"name": "DotNet-Build",
|
||||
"pool": {
|
||||
"id": 39,
|
||||
"name": "DotNet-Build"
|
||||
}
|
||||
},
|
||||
"id": 6057,
|
||||
"name": "Core-Setup-Linux-BT",
|
||||
"path": "\\",
|
||||
"type": "build",
|
||||
"project": {
|
||||
"id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"name": "DevDiv",
|
||||
"description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"state": "wellFormed",
|
||||
"revision": 418097642
|
||||
}
|
||||
}
|
|
@ -1,5 +1,41 @@
|
|||
{
|
||||
"build": [
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Cleanup previous build",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "rm",
|
||||
"arguments": "-dfr $(PB_SourcesDirectory)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Clone repo",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "clone $(PB_VsoRepoUrl) $(PB_SourcesDirectory)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
|
@ -14,7 +50,7 @@
|
|||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "checkout $(SourceVersion)",
|
||||
"workingFolder": "",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
|
@ -22,84 +58,7 @@
|
|||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Create host machine tools sandbox",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c",
|
||||
"versionSpec": "2.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"SourceFolder": "pkg",
|
||||
"Contents": "**",
|
||||
"TargetFolder": "$(DockerHost_Sandbox)",
|
||||
"CleanTargetFolder": "false",
|
||||
"OverWrite": "false",
|
||||
"flattenFolders": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Initialize tools for host machine",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
|
||||
"versionSpec": "2.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptPath": "$(DockerHost_Sandbox)/init-tools.sh",
|
||||
"args": "",
|
||||
"disableAutoCwd": "false",
|
||||
"cwd": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Initialize Docker",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
|
||||
"versionSpec": "2.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptPath": "$(DockerHost_ToolsDirectory)/scripts/docker/init-docker.sh",
|
||||
"args": "",
|
||||
"disableAutoCwd": "false",
|
||||
"cwd": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Run build in Docker container",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
|
||||
"versionSpec": "2.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptPath": "build.sh",
|
||||
"args": "$(BuildArguments)",
|
||||
"disableAutoCwd": "false",
|
||||
"cwd": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": true,
|
||||
"displayName": "Cleanup Docker",
|
||||
"displayName": "Init tools",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
|
@ -107,36 +66,17 @@
|
|||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "perl",
|
||||
"arguments": "$(DockerHost_ToolsDirectory)/scripts/docker/cleanup-docker.sh",
|
||||
"workingFolder": "",
|
||||
"filename": "$(PB_SourcesDirectory)/init-tools.sh",
|
||||
"arguments": "",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": true,
|
||||
"displayName": "Copy Publish Artifact: Build Logs",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "1d341bb0-2106-458c-8422-d00bcea6512a",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"CopyRoot": "",
|
||||
"Contents": "**/*.log",
|
||||
"ArtifactName": "Build Logs",
|
||||
"ArtifactType": "Container",
|
||||
"TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": true,
|
||||
"displayName": "Cleanup VSTS Agent",
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Generate version assets",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
|
@ -144,9 +84,63 @@
|
|||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(DockerHost_ToolsDirectory)/msbuild.sh",
|
||||
"arguments": "cleanupagent.proj /p:AgentDirectory=$(Agent.HomeDirectory) /p:DoClean=$(PB_CleanAgent)",
|
||||
"workingFolder": "$(DockerHost_ToolsDirectory)/scripts/vstsagent/",
|
||||
"filename": "$(PB_SourcesDirectory)/Tools/msbuild.sh",
|
||||
"arguments": "$(PB_SourcesDirectory)/build.proj /t:GenerateVersionSourceFile /p:GenerateVersionSourceFile=true /p:OfficialBuildId=$(OfficialBuildId)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Build",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_SourcesDirectory)/build.sh",
|
||||
"arguments": "-OfficialBuildId=$(OfficialBuildId) $(PB_BuildArguments)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Publish",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_SourcesDirectory)/Tools/msbuild.sh",
|
||||
"arguments": "$(PB_SourcesDirectory)/publish/publish.proj /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:DistroRid=$(PB_DistroRid) /p:TargetArchitecture=$(PB_TargetArchitecture) /p:ConfigurationGroup=$(BuildConfiguration)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Clean up VSTS agent",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_SourcesDirectory)/Tools/msbuild.sh",
|
||||
"arguments": "$(PB_SourcesDirectory)/Tools/scripts/vstsagent/cleanupagent.proj /p:AgentDirectory=$(Agent.HomeDirectory) /p:DoClean=$(PB_CleanAgent)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
}
|
||||
|
@ -199,8 +193,8 @@
|
|||
"value": "Release",
|
||||
"allowOverride": true
|
||||
},
|
||||
"BuildArguments": {
|
||||
"value": "--skip-prereqs --configuration $(BuildConfiguration) --docker $(PB_DockerOS) --targets Default",
|
||||
"PB_BuildArguments": {
|
||||
"value": "--skip-prereqs --configuration $(BuildConfiguration) --targets Default",
|
||||
"allowOverride": true
|
||||
},
|
||||
"CONNECTION_STRING": {
|
||||
|
@ -219,28 +213,44 @@
|
|||
"GITHUB_PASSWORD": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"DOTNET_BUILD_CONTAINER_TAG": {
|
||||
"value": "core-setup-$(PB_DockerOS)-$(Build.BuildId)"
|
||||
},
|
||||
"PB_DockerOS": {
|
||||
"value": "debian8",
|
||||
"allowOverride": true
|
||||
"NUGET_SYMBOLS_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/symbols/api/v2/package"
|
||||
},
|
||||
"PB_CleanAgent": {
|
||||
"value": "true"
|
||||
},
|
||||
"DockerHost_Sandbox": {
|
||||
"value": "$(Build.StagingDirectory)/HostSandbox"
|
||||
"PB_SourcesDirectory": {
|
||||
"value": "$(Build.SourcesDirectory)/core-setup"
|
||||
},
|
||||
"DockerHost_ToolsDirectory": {
|
||||
"value": "$(DockerHost_Sandbox)/Tools"
|
||||
"PB_Branch": {
|
||||
"value": "buildtools"
|
||||
},
|
||||
"NUGET_SYMBOLS_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/api/v2/package"
|
||||
"PB_AzureAccountName": {
|
||||
"value": "sourcebuild"
|
||||
},
|
||||
"PB_AzureAccessToken": {
|
||||
"value": null,
|
||||
"isSecret": true
|
||||
},
|
||||
"PB_VsoRepoUrl": {
|
||||
"value": "--branch $(PB_Branch) https://$(PB_VsoAccountName):$(PB_VsoPassword)@devdiv.visualstudio.com/DevDiv/_git/DotNet-Core-Setup-Trusted"
|
||||
},
|
||||
"PB_VsoAccountName": {
|
||||
"value": "dn-bot"
|
||||
},
|
||||
"PB_VsoPassword": {
|
||||
"value": null,
|
||||
"isSecret": true
|
||||
},
|
||||
"SourceVersion": {
|
||||
"value": "HEAD"
|
||||
},
|
||||
"OfficialBuildId": {
|
||||
"value": "$(Build.BuildNumber)"
|
||||
}
|
||||
},
|
||||
"demands": [
|
||||
"Agent.OS -equals linux"
|
||||
"Configuration -equals VSTSAgent_Mac_v3.0.0"
|
||||
],
|
||||
"retentionRules": [
|
||||
{
|
||||
|
@ -253,54 +263,53 @@
|
|||
"SymbolStore"
|
||||
],
|
||||
"daysToKeep": 2,
|
||||
"minimumToKeep": 10,
|
||||
"minimumToKeep": 1,
|
||||
"deleteBuildRecord": true,
|
||||
"deleteTestResults": true
|
||||
}
|
||||
],
|
||||
"buildNumberFormat": "$(date:yyyMMdd)$(rev:.r)-$(PB_DockerOS)",
|
||||
"buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)",
|
||||
"jobAuthorizationScope": "projectCollection",
|
||||
"jobTimeoutInMinutes": 90,
|
||||
"jobCancelTimeoutInMinutes": 5,
|
||||
"badgeEnabled": true,
|
||||
"repository": {
|
||||
"properties": {
|
||||
"connectedServiceId": "f4c31735-42d2-4c3a-bc47-7ac06fd0dccc",
|
||||
"apiUrl": "https://api.github.com/repos/dotnet/core-setup",
|
||||
"branchesUrl": "https://api.github.com/repos/dotnet/core-setup/branches",
|
||||
"cloneUrl": "https://github.com/dotnet/core-setup.git",
|
||||
"refsUrl": "https://api.github.com/repos/dotnet/core-setup/git/refs",
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "false",
|
||||
"labelSources": "0",
|
||||
"reportBuildStatus": "true",
|
||||
"fetchDepth": "0",
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "true",
|
||||
"cleanOptions": "0"
|
||||
},
|
||||
"id": "https://github.com/dotnet/core-setup.git",
|
||||
"type": "GitHub",
|
||||
"name": "dotnet/core-setup",
|
||||
"url": "https://github.com/dotnet/core-setup.git",
|
||||
"defaultBranch": "master",
|
||||
"clean": "true",
|
||||
"id": "c19ea379-feb7-4ca5-8f7f-5f2b5095ea62",
|
||||
"type": "TfsGit",
|
||||
"name": "DotNet-Core-Setup-Trusted",
|
||||
"url": "https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Core-Setup-Trusted",
|
||||
"defaultBranch": "refs/heads/buildtools",
|
||||
"clean": "false",
|
||||
"checkoutSubmodules": false
|
||||
},
|
||||
"quality": "definition",
|
||||
"queue": {
|
||||
"id": 330,
|
||||
"name": "DotNetCore-Build",
|
||||
"pool": {
|
||||
"id": 39,
|
||||
"name": "DotNet-Build"
|
||||
},
|
||||
"id": 36,
|
||||
"name": "DotNet-Build"
|
||||
"id": 97,
|
||||
"name": "DotNetCore-Build"
|
||||
}
|
||||
},
|
||||
"id": 6192,
|
||||
"name": "Core-Setup-OSX-BT",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_apis/build/Definitions/6192",
|
||||
"path": "\\",
|
||||
"type": "build",
|
||||
"id": 5075,
|
||||
"name": "Core-Setup-Linux",
|
||||
"project": {
|
||||
"id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"name": "DevDiv",
|
||||
"description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"state": "wellFormed",
|
||||
"revision": 418097620
|
||||
"revision": 418097676
|
||||
}
|
||||
}
|
|
@ -1,237 +0,0 @@
|
|||
{
|
||||
"build": [
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "git checkout",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "checkout $(SourceVersion)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Shell Script build.sh",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
|
||||
"versionSpec": "2.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptPath": "build.sh",
|
||||
"args": "$(BuildArguments)",
|
||||
"disableAutoCwd": "false",
|
||||
"cwd": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": true,
|
||||
"displayName": "Initialize tools",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "6c731c3c-3c68-459a-a5c9-bde6e6595b5b",
|
||||
"versionSpec": "2.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptPath": "pkg/init-tools.sh",
|
||||
"args": "",
|
||||
"disableAutoCwd": "false",
|
||||
"cwd": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": true,
|
||||
"displayName": "Clean up Docker images and containers",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "perl",
|
||||
"arguments": "pkg/Tools/scripts/docker/cleanup-docker.sh",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": true,
|
||||
"displayName": "Copy Publish Artifact: Build Logs",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "1d341bb0-2106-458c-8422-d00bcea6512a",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"CopyRoot": "",
|
||||
"Contents": "**/*.log",
|
||||
"ArtifactName": "Build Logs",
|
||||
"ArtifactType": "Container",
|
||||
"TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
|
||||
}
|
||||
}
|
||||
],
|
||||
"options": [
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "5bc3cfb7-6b54-4a4b-b5d2-a3905949f8a6"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "7c555368-ca64-4199-add6-9ebaf0b0137d"
|
||||
},
|
||||
"inputs": {
|
||||
"multipliers": "[]",
|
||||
"parallel": "false",
|
||||
"continueOnError": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "a9db38f9-9fdc-478c-b0f9-464221e58316"
|
||||
},
|
||||
"inputs": {
|
||||
"workItemType": "4777",
|
||||
"assignToRequestor": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "57578776-4c22-4526-aeb0-86b6da17ee9c"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"BuildConfiguration": {
|
||||
"value": "Release",
|
||||
"allowOverride": true
|
||||
},
|
||||
"BuildArguments": {
|
||||
"value": "--skip-prereqs --configuration $(BuildConfiguration) --targets Default $(PB_PortableBuild)",
|
||||
"allowOverride": true
|
||||
},
|
||||
"PB_PortableBuild": {
|
||||
"value": "",
|
||||
"allowOverride": true
|
||||
},
|
||||
"CONNECTION_STRING": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"PUBLISH_TO_AZURE_BLOB": {
|
||||
"value": "true",
|
||||
"allowOverride": true
|
||||
},
|
||||
"NUGET_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/api/v2/package"
|
||||
},
|
||||
"NUGET_API_KEY": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"GITHUB_PASSWORD": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"NUGET_SYMBOLS_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/symbols/api/v2/package"
|
||||
}
|
||||
},
|
||||
"demands": [
|
||||
"Configuration -equals VSTSAgent_Mac_v3.0.0"
|
||||
],
|
||||
"retentionRules": [
|
||||
{
|
||||
"branches": [
|
||||
"+refs/heads/*"
|
||||
],
|
||||
"artifacts": [],
|
||||
"artifactTypesToDelete": [
|
||||
"FilePath",
|
||||
"SymbolStore"
|
||||
],
|
||||
"daysToKeep": 2,
|
||||
"minimumToKeep": 1,
|
||||
"deleteBuildRecord": true,
|
||||
"deleteTestResults": true
|
||||
}
|
||||
],
|
||||
"buildNumberFormat": "$(date:yyyyMMdd)$(rev:.r)",
|
||||
"jobAuthorizationScope": "projectCollection",
|
||||
"jobTimeoutInMinutes": 90,
|
||||
"badgeEnabled": true,
|
||||
"repository": {
|
||||
"properties": {
|
||||
"connectedServiceId": "f4c31735-42d2-4c3a-bc47-7ac06fd0dccc",
|
||||
"apiUrl": "https://api.github.com/repos/dotnet/core-setup",
|
||||
"branchesUrl": "https://api.github.com/repos/dotnet/core-setup/branches",
|
||||
"cloneUrl": "https://github.com/dotnet/core-setup.git",
|
||||
"refsUrl": "https://api.github.com/repos/dotnet/core-setup/git/refs",
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "false",
|
||||
"fetchDepth": "0",
|
||||
"cleanOptions": "0"
|
||||
},
|
||||
"id": "https://github.com/dotnet/core-setup.git",
|
||||
"type": "GitHub",
|
||||
"name": "dotnet/core-setup",
|
||||
"url": "https://github.com/dotnet/core-setup.git",
|
||||
"defaultBranch": "master",
|
||||
"clean": "true",
|
||||
"checkoutSubmodules": false
|
||||
},
|
||||
"quality": "definition",
|
||||
"queue": {
|
||||
"pool": {
|
||||
"id": 97,
|
||||
"name": "DotNetCore-Build"
|
||||
},
|
||||
"id": 330,
|
||||
"name": "DotNetCore-Build"
|
||||
},
|
||||
"path": "\\",
|
||||
"type": "build",
|
||||
"id": 3544,
|
||||
"name": "Core-Setup-OSX-x64",
|
||||
"project": {
|
||||
"id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"name": "DevDiv",
|
||||
"description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"state": "wellFormed",
|
||||
"revision": 418097620
|
||||
}
|
||||
}
|
|
@ -1,5 +1,43 @@
|
|||
{
|
||||
"build": [
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Cleanup previous build if present",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptType": "inlineScript",
|
||||
"scriptName": "",
|
||||
"arguments": "-path $(PB_SourcesDirectory)",
|
||||
"inlineScript": "param($path)\n\nif (Test-Path $path){\n # this will print out an error each time a file can't be deleted.\n Remove-Item -Recurse -Force $path\n }",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Clone repo",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "clone $(PB_VsoRepoUrl) $(PB_SourcesDirectory)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
|
@ -14,7 +52,7 @@
|
|||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "checkout $(SourceVersion)",
|
||||
"workingFolder": "",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
|
@ -36,26 +74,6 @@
|
|||
"feedSource": "https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Compile CoreHost",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptType": "filePath",
|
||||
"scriptName": "build_projects/dotnet-host-build/build.ps1",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Targets Prepare,CompileCoreHost $(PB_PortableBuild)",
|
||||
"inlineScript": "# You can write your powershell scripts inline here. \n# You can also pass predefined and custom variables to this scripts using arguments\n\n Write-Host \"Hello World\"",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
|
@ -68,13 +86,76 @@
|
|||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "pkg\\init-tools.cmd",
|
||||
"filename": "$(PB_SourcesDirectory)\\init-tools.cmd",
|
||||
"arguments": "",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Generate version assets",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_SourcesDirectory)\\build.cmd",
|
||||
"arguments": "-- /t:GenerateVersionSourceFile /p:GenerateVersionSourceFile=true /p:OfficialBuildId=$(OfficialBuildId) $(PB_CommonMSBuildArgs)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Build traversal build dependencies",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_SourcesDirectory)\\build.cmd",
|
||||
"arguments": "-- $(PB_CommonMSBuildArgs) /t:BuildTraversalBuildDependencies /flp:v=diag",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Build corehost",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "$(PB_SourcesDirectory)/src/corehost/build.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "$(PB_CommonMSBuildArgs)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x86",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
|
@ -87,10 +168,10 @@
|
|||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"platform": "",
|
||||
"solution": "$(PB_SourcesDirectory)\\sign.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignCoreHost $(MsbuildSigningArguments)",
|
||||
"msbuildArguments": "/t:SignCoreHost $(MsbuildSigningArguments) $(PB_CommonMSBuildArgs)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
|
@ -104,28 +185,62 @@
|
|||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "PackagePkgProjects",
|
||||
"displayName": "Build nuget packages",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptType": "filePath",
|
||||
"scriptName": "build_projects/dotnet-host-build/build.ps1",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Targets Prepare,PackagePkgProjects,BuildProjectsForNuGetPackages $(PB_PortableBuild)",
|
||||
"inlineScript": "# You can write your powershell scripts inline here. \n# You can also pass predefined and custom variables to this scripts using arguments\n\n Write-Host \"Hello World\"",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "true"
|
||||
"solution": "$(PB_SourcesDirectory)\\src\\pkg\\dir.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/p:IncludeAllRuntimePackagesInPlatformManifest=false $(PB_CommonMSBuildArgs) /flp:v=diag;LogFile=$(PB_SourcesDirectory)\\packages.log",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x86",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Build managed / publish sharedframework",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "$(PB_SourcesDirectory)\\src\\managed\\dir.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "$(PB_CommonMSBuildArgs) /flp:v=diag;LogFile=$(PB_SourcesDirectory)\\sharedframework.log",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x86",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "PublishSharedFramework",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
|
@ -153,10 +268,10 @@
|
|||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"platform": "",
|
||||
"solution": "$(PB_SourcesDirectory)\\sign.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignSharedFrameworkCrossgenedAssemblies $(MsbuildSigningArguments)",
|
||||
"msbuildArguments": "/t:SignSharedFrameworkCrossgenedAssemblies $(PB_CommonMSBuildArgs) $(MsbuildSigningArguments)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
|
@ -180,10 +295,10 @@
|
|||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"platform": "",
|
||||
"solution": "$(PB_SourcesDirectory)\\sign.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignAssemblies $(MsbuildSigningArguments)",
|
||||
"msbuildArguments": "/t:SignAssemblies $(PB_CommonMSBuildArgs) $(MsbuildSigningArguments)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
|
@ -199,6 +314,60 @@
|
|||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Package",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "$(PB_SourcesDirectory)\\src\\pkg\\packaging\\dir.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "$(PB_CommonMSBuildArgs) /flp:v=diag",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "true",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x86",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Build and run tests",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "$(PB_SourcesDirectory)\\src\\test\\dir.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "$(PB_CommonMSBuildArgs) /flp:v=diag;LogFile=$(PB_SourcesDirectory)\\tests.log",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x86",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Test and Package",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
|
@ -226,10 +395,10 @@
|
|||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"solution": "$(PB_SourcesDirectory)\\sign.proj",
|
||||
"platform": "",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignMsiAndCab $(MsbuildSigningArguments)",
|
||||
"msbuildArguments": "/t:SignMsiAndCab $(PB_CommonMSBuildArgs) $(MsbuildSigningArguments)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
|
@ -242,7 +411,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Generate Bundle",
|
||||
|
@ -261,7 +430,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Extract Engine from bundle",
|
||||
|
@ -280,34 +449,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Sign Engine",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"platform": "",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignEngine $(MsbuildSigningArguments)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x64",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Reattach Engine to Bundle",
|
||||
|
@ -326,7 +468,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Sign Bundle",
|
||||
|
@ -352,6 +494,33 @@
|
|||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Publish",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "$(PB_SourcesDirectory)\\publish\\publish.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "$(PB_CommonMSBuildArgs) /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x86",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
|
@ -366,7 +535,7 @@
|
|||
"inputs": {}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"enabled": false,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Publish Build Artifacts",
|
||||
|
@ -486,12 +655,15 @@
|
|||
"CertificateId": {
|
||||
"value": "400"
|
||||
},
|
||||
"PB_DistroRid": {
|
||||
"value": "win-x64"
|
||||
},
|
||||
"RID": {
|
||||
"value": "win-x64",
|
||||
"allowOverride": true
|
||||
},
|
||||
"MsbuildSigningArguments": {
|
||||
"value": "/p:RID=$(RID) /p:CertificateId=$(CertificateId) /v:detailed"
|
||||
"value": "/p:CertificateId=$(CertificateId) /v:detailed"
|
||||
},
|
||||
"TeamName": {
|
||||
"value": "DotNetCore"
|
||||
|
@ -505,6 +677,45 @@
|
|||
},
|
||||
"NUGET_SYMBOLS_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/symbols/api/v2/package"
|
||||
},
|
||||
"PB_SourcesDirectory": {
|
||||
"value": "$(Build.SourcesDirectory)\\core-setup"
|
||||
},
|
||||
"PB_VsoRepoUrl": {
|
||||
"value": "--branch $(PB_Branch) https://$(PB_VsoAccountName):$(PB_VsoPassword)@devdiv.visualstudio.com/DevDiv/_git/DotNet-Core-Setup-Trusted"
|
||||
},
|
||||
"PB_AzureAccountName": {
|
||||
"value": "sourcebuild"
|
||||
},
|
||||
"PB_AzureAccessToken": {
|
||||
"value": null,
|
||||
"isSecret": true
|
||||
},
|
||||
"PB_VsoAccountName": {
|
||||
"value": "dn-bot"
|
||||
},
|
||||
"PB_VsoPassword": {
|
||||
"value": null,
|
||||
"isSecret": true
|
||||
},
|
||||
"PB_Branch": {
|
||||
"value": "buildtools"
|
||||
},
|
||||
"SourceVersion": {
|
||||
"value": "HEAD"
|
||||
},
|
||||
"PB_SignType": {
|
||||
"value": "real"
|
||||
},
|
||||
"PB_CommonMSBuildArgs": {
|
||||
"value": "/p:DistroRid=$(PB_DistroRid) /p:ConfigurationGroup=$(BuildConfiguration) /p:TargetArchitecture=$(PB_TargetArchitecture)"
|
||||
},
|
||||
"OfficialBuildId": {
|
||||
"value": "$(Build.BuildNumber)"
|
||||
},
|
||||
"PB_TargetArchitecture": {
|
||||
"value": "x64",
|
||||
"allowOverride": true
|
||||
}
|
||||
},
|
||||
"demands": [
|
||||
|
@ -526,49 +737,48 @@
|
|||
"deleteTestResults": true
|
||||
}
|
||||
],
|
||||
"buildNumberFormat": "$(Date:yyyMMdd)$(Rev:.r)",
|
||||
"buildNumberFormat": "$(Date:yyyyMMdd)$(Rev:-rr)",
|
||||
"jobAuthorizationScope": "projectCollection",
|
||||
"jobTimeoutInMinutes": 120,
|
||||
"jobCancelTimeoutInMinutes": 5,
|
||||
"badgeEnabled": true,
|
||||
"repository": {
|
||||
"properties": {
|
||||
"connectedServiceId": "f4c31735-42d2-4c3a-bc47-7ac06fd0dccc",
|
||||
"apiUrl": "https://api.github.com/repos/dotnet/core-setup",
|
||||
"branchesUrl": "https://api.github.com/repos/dotnet/core-setup/branches",
|
||||
"cloneUrl": "https://github.com/dotnet/core-setup.git",
|
||||
"refsUrl": "https://api.github.com/repos/dotnet/core-setup/git/refs",
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "false",
|
||||
"labelSources": "0",
|
||||
"reportBuildStatus": "true",
|
||||
"fetchDepth": "0",
|
||||
"cleanOptions": "0"
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "true",
|
||||
"cleanOptions": "3"
|
||||
},
|
||||
"id": "https://github.com/dotnet/core-setup.git",
|
||||
"type": "GitHub",
|
||||
"name": "dotnet/core-setup",
|
||||
"url": "https://github.com/dotnet/core-setup.git",
|
||||
"defaultBranch": "master",
|
||||
"clean": "true",
|
||||
"id": "c19ea379-feb7-4ca5-8f7f-5f2b5095ea62",
|
||||
"type": "TfsGit",
|
||||
"name": "DotNet-Core-Setup-Trusted",
|
||||
"url": "https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Core-Setup-Trusted",
|
||||
"defaultBranch": "refs/heads/master",
|
||||
"clean": "false",
|
||||
"checkoutSubmodules": false
|
||||
},
|
||||
"quality": "definition",
|
||||
"queue": {
|
||||
"id": 36,
|
||||
"name": "DotNet-Build",
|
||||
"pool": {
|
||||
"id": 39,
|
||||
"name": "DotNet-Build"
|
||||
},
|
||||
"id": 36,
|
||||
"name": "DotNet-Build"
|
||||
}
|
||||
},
|
||||
"id": 6102,
|
||||
"name": "Core-Setup-Signing-Windows-BT",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_apis/build/Definitions/6102",
|
||||
"path": "\\",
|
||||
"type": "build",
|
||||
"id": 5154,
|
||||
"name": "Core-Setup-Signing-Windows-x64",
|
||||
"project": {
|
||||
"id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"name": "DevDiv",
|
||||
"description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"state": "wellFormed",
|
||||
"revision": 418097620
|
||||
"revision": 418097676
|
||||
}
|
||||
}
|
|
@ -1,544 +0,0 @@
|
|||
{
|
||||
"build": [
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "git checkout",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "checkout $(SourceVersion)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Install Signing Plugin",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "30666190-6959-11e5-9f96-f56098202fef",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"signType": "$(PB_SignType)",
|
||||
"zipSources": "false",
|
||||
"version": "",
|
||||
"feedSource": "https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Compile CoreHost",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptType": "filePath",
|
||||
"scriptName": "build_projects/dotnet-host-build/build.ps1",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Architecture $(BuildArchitecture) -Targets Prepare,CompileCoreHost $(PB_PortableBuild)",
|
||||
"inlineScript": "# You can write your powershell scripts inline here. \n# You can also pass predefined and custom variables to this scripts using arguments\n\n Write-Host \"Hello World\"",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Run init-tools.cmd",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "pkg\\init-tools.cmd",
|
||||
"arguments": "",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Sign HostFxr HostPolicy",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"platform": "",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignCoreHost $(MsbuildSigningArguments)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "$(BuildArchitecture)",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "PackagePkgProjects",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptType": "filePath",
|
||||
"scriptName": "build_projects/dotnet-host-build/build.ps1",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Architecture $(BuildArchitecture) -Targets Prepare,PackagePkgProjects $(PB_PortableBuild)",
|
||||
"inlineScript": "# You can write your powershell scripts inline here. \n# You can also pass predefined and custom variables to this scripts using arguments\n\n Write-Host \"Hello World\"",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "PublishSharedFramework",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "build.cmd",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Architecture $(BuildArchitecture) -Targets Prepare,PublishSharedFrameworkAndSharedHost $(PB_PortableBuild)",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Sign Shared Framework Crossgened Assemblies",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"platform": "",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignSharedFrameworkCrossgenedAssemblies $(MsbuildSigningArguments)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "$(BuildArchitecture)",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Test and Package",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "build.cmd",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Architecture $(BuildArchitecture) -Targets Prepare,Test,GenerateVersionBadge,GenerateZip,GenerateMsis $(PB_PortableBuild)",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Sign MSI and cab",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"platform": "",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignMsiAndCab $(MsbuildSigningArguments)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "$(BuildArchitecture)",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Generate Bundle",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "build.cmd",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Architecture $(BuildArchitecture) -Targets Prepare,GenerateBundles $(PB_PortableBuild)",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Extract Engine from bundle",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "build.cmd",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Architecture $(BuildArchitecture) -Targets Prepare,ExtractEngineFromBundle $(PB_PortableBuild)",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Sign Engine",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"platform": "",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignEngine $(MsbuildSigningArguments)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "$(BuildArchitecture)",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Reattach Engine to Bundle",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "build.cmd",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Architecture $(BuildArchitecture) -Targets Prepare,ReattachEngineToBundle $(PB_PortableBuild)",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Sign Bundle",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "build_projects\\signing\\sign.proj",
|
||||
"platform": "",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:SignBundle $(MsbuildSigningArguments)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "$(BuildArchitecture)",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Perform Cleanup Tasks",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "521a94ea-9e68-468a-8167-6dcf361ea776",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Publish Build Artifacts",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "build.cmd",
|
||||
"arguments": "-Configuration $(BuildConfiguration) -Architecture $(BuildArchitecture) -Targets Prepare,Publish $(PB_PortableBuild)",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": true,
|
||||
"displayName": "Copy Publish Artifact: Build Logs",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "1d341bb0-2106-458c-8422-d00bcea6512a",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"CopyRoot": "",
|
||||
"Contents": "**\\*.log",
|
||||
"ArtifactName": "Build Logs",
|
||||
"ArtifactType": "Container",
|
||||
"TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
|
||||
}
|
||||
}
|
||||
],
|
||||
"options": [
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "5bc3cfb7-6b54-4a4b-b5d2-a3905949f8a6"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "7c555368-ca64-4199-add6-9ebaf0b0137d"
|
||||
},
|
||||
"inputs": {
|
||||
"multipliers": "[]",
|
||||
"parallel": "false",
|
||||
"continueOnError": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "a9db38f9-9fdc-478c-b0f9-464221e58316"
|
||||
},
|
||||
"inputs": {
|
||||
"workItemType": "4777",
|
||||
"assignToRequestor": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "57578776-4c22-4526-aeb0-86b6da17ee9c"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"BuildConfiguration": {
|
||||
"value": "Release",
|
||||
"allowOverride": true
|
||||
},
|
||||
"COREHOST_TRACE": {
|
||||
"value": "0",
|
||||
"allowOverride": true
|
||||
},
|
||||
"STORAGE_ACCOUNT": {
|
||||
"value": "dotnetcli"
|
||||
},
|
||||
"STORAGE_CONTAINER": {
|
||||
"value": "dotnet"
|
||||
},
|
||||
"CONNECTION_STRING": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"PUBLISH_TO_AZURE_BLOB": {
|
||||
"value": "true"
|
||||
},
|
||||
"NUGET_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/api/v2/package"
|
||||
},
|
||||
"NUGET_API_KEY": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"GITHUB_PASSWORD": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"BuildArchitecture": {
|
||||
"value": "x86"
|
||||
},
|
||||
"CertificateId": {
|
||||
"value": "400"
|
||||
},
|
||||
"RID": {
|
||||
"value": "win-x86",
|
||||
"allowOverride": true
|
||||
},
|
||||
"PB_PortableBuild": {
|
||||
"value": "",
|
||||
"allowOverride": true
|
||||
},
|
||||
"MsbuildSigningArguments": {
|
||||
"value": "/p:RID=$(RID) /p:CertificateId=$(CertificateId) /v:detailed"
|
||||
},
|
||||
"TeamName": {
|
||||
"value": "DotNetCore"
|
||||
},
|
||||
"system.debug": {
|
||||
"value": "false"
|
||||
},
|
||||
"NUGET_SYMBOLS_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/symbols/api/v2/package"
|
||||
}
|
||||
},
|
||||
"demands": [
|
||||
"Agent.OS -equals Windows_NT"
|
||||
],
|
||||
"retentionRules": [
|
||||
{
|
||||
"branches": [
|
||||
"+refs/heads/*"
|
||||
],
|
||||
"artifacts": [],
|
||||
"artifactTypesToDelete": [
|
||||
"FilePath",
|
||||
"SymbolStore"
|
||||
],
|
||||
"daysToKeep": 2,
|
||||
"minimumToKeep": 1,
|
||||
"deleteBuildRecord": true,
|
||||
"deleteTestResults": true
|
||||
}
|
||||
],
|
||||
"buildNumberFormat": "$(Date:yyyMMdd)$(Rev:.r)",
|
||||
"jobAuthorizationScope": "projectCollection",
|
||||
"jobTimeoutInMinutes": 120,
|
||||
"badgeEnabled": true,
|
||||
"repository": {
|
||||
"properties": {
|
||||
"connectedServiceId": "f4c31735-42d2-4c3a-bc47-7ac06fd0dccc",
|
||||
"apiUrl": "https://api.github.com/repos/dotnet/core-setup",
|
||||
"branchesUrl": "https://api.github.com/repos/dotnet/core-setup/branches",
|
||||
"cloneUrl": "https://github.com/dotnet/core-setup.git",
|
||||
"refsUrl": "https://api.github.com/repos/dotnet/core-setup/git/refs",
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "false",
|
||||
"fetchDepth": "0",
|
||||
"cleanOptions": "0"
|
||||
},
|
||||
"id": "https://github.com/dotnet/core-setup.git",
|
||||
"type": "GitHub",
|
||||
"name": "dotnet/core-setup",
|
||||
"url": "https://github.com/dotnet/core-setup.git",
|
||||
"defaultBranch": "master",
|
||||
"clean": "true",
|
||||
"checkoutSubmodules": false
|
||||
},
|
||||
"quality": "definition",
|
||||
"queue": {
|
||||
"pool": {
|
||||
"id": 39,
|
||||
"name": "DotNet-Build"
|
||||
},
|
||||
"id": 36,
|
||||
"name": "DotNet-Build"
|
||||
},
|
||||
"path": "\\",
|
||||
"type": "build",
|
||||
"id": 5154,
|
||||
"name": "Core-Setup-Signing-Windows-x86",
|
||||
"project": {
|
||||
"id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"name": "DevDiv",
|
||||
"description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"state": "wellFormed",
|
||||
"revision": 418097620
|
||||
}
|
||||
}
|
|
@ -0,0 +1,360 @@
|
|||
{
|
||||
"build": [
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Cleanup previous build if present",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"scriptType": "inlineScript",
|
||||
"scriptName": "",
|
||||
"arguments": "-path $(PB_SourcesDirectory)",
|
||||
"inlineScript": "param($path)\n\nif (Test-Path $path){\n # this will print out an error each time a file can't be deleted.\n Remove-Item -Recurse -Force $path\n }",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Clone repo",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "clone $(PB_VsoRepoUrl) $(PB_SourcesDirectory)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "git checkout",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "checkout $(SourceVersion)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Init tools",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_SourcesDirectory)\\init-tools.cmd",
|
||||
"arguments": "",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Generate version assets",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "$(PB_SourcesDirectory)\\build.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/t:GenerateVersionSourceFile /p:GenerateVersionSourceFile=true /p:OfficialBuildId=$(OfficialBuildId)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x86",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Build",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "$(PB_SourcesDirectory)\\build.cmd",
|
||||
"arguments": "$(PB_BuildArguments)",
|
||||
"workingFolder": "$(PB_SourcesDirectory)",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Publish",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "$(PB_SourcesDirectory)\\publish\\publish.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:DistroRid=$(PB_DistroRid) /p:TargetArchitecture=$(PB_TargetArchitecture) /p:ConfigurationGroup=$(BuildConfiguration)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x86",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Clean up VSTS agent",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"solution": "$(PB_SourcesDirectory)\\Tools\\scripts\\vstsagent\\cleanupagent.proj",
|
||||
"platform": "$(PB_TargetArchitecture)",
|
||||
"configuration": "$(BuildConfiguration)",
|
||||
"msbuildArguments": "/p:AgentDirectory=$(Agent.HomeDirectory) /p:DoClean=$(PB_CleanAgent)",
|
||||
"clean": "false",
|
||||
"maximumCpuCount": "false",
|
||||
"restoreNugetPackages": "false",
|
||||
"logProjectEvents": "false",
|
||||
"createLogFile": "false",
|
||||
"msbuildLocationMethod": "version",
|
||||
"msbuildVersion": "15.0",
|
||||
"msbuildArchitecture": "x86",
|
||||
"msbuildLocation": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"options": [
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "5bc3cfb7-6b54-4a4b-b5d2-a3905949f8a6"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "7c555368-ca64-4199-add6-9ebaf0b0137d"
|
||||
},
|
||||
"inputs": {
|
||||
"multipliers": "[]",
|
||||
"parallel": "false",
|
||||
"continueOnError": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "a9db38f9-9fdc-478c-b0f9-464221e58316"
|
||||
},
|
||||
"inputs": {
|
||||
"workItemType": "4777",
|
||||
"assignToRequestor": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "57578776-4c22-4526-aeb0-86b6da17ee9c"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"NUGET_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/api/v2/package"
|
||||
},
|
||||
"NUGET_API_KEY": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"GITHUB_PASSWORD": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"COREHOST_TRACE": {
|
||||
"value": "0"
|
||||
},
|
||||
"STORAGE_ACCOUNT": {
|
||||
"value": "dotnetcli"
|
||||
},
|
||||
"STORAGE_CONTAINER": {
|
||||
"value": "dotnet"
|
||||
},
|
||||
"CONNECTION_STRING": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"PUBLISH_TO_AZURE_BLOB": {
|
||||
"value": "true",
|
||||
"allowOverride": true
|
||||
},
|
||||
"NUGET_SYMBOLS_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/symbols/api/v2/package"
|
||||
},
|
||||
"BuildConfiguration": {
|
||||
"value": "Release"
|
||||
},
|
||||
"PB_BuildArguments": {
|
||||
"value": "-ConfigurationGroup=$(BuildConfiguration) $(PB_AdditionalBuildArguments)"
|
||||
},
|
||||
"PB_CleanAgent": {
|
||||
"value": "true"
|
||||
},
|
||||
"PB_SourcesDirectory": {
|
||||
"value": "$(Build.SourcesDirectory)\\core-setup"
|
||||
},
|
||||
"PB_Branch": {
|
||||
"value": "buildtools"
|
||||
},
|
||||
"PB_AzureAccountName": {
|
||||
"value": "sourcebuild"
|
||||
},
|
||||
"PB_AzureAccessToken": {
|
||||
"value": null,
|
||||
"isSecret": true
|
||||
},
|
||||
"PB_VsoRepoUrl": {
|
||||
"value": "--branch $(PB_Branch) https://$(PB_VsoAccountName):$(PB_VsoPassword)@devdiv.visualstudio.com/DevDiv/_git/DotNet-Core-Setup-Trusted"
|
||||
},
|
||||
"PB_VsoAccountName": {
|
||||
"value": "dn-bot"
|
||||
},
|
||||
"PB_VsoPassword": {
|
||||
"value": null,
|
||||
"isSecret": true
|
||||
},
|
||||
"SourceVersion": {
|
||||
"value": "HEAD"
|
||||
},
|
||||
"OfficialBuildId": {
|
||||
"value": "$(Build.BuildNumber)"
|
||||
},
|
||||
"PB_TargetArchitecture": {
|
||||
"value": "x64",
|
||||
"allowOverride": true
|
||||
},
|
||||
"PB_AdditionalBuildArguments": {
|
||||
"value": "",
|
||||
"allowOverride": true
|
||||
}
|
||||
},
|
||||
"demands": [
|
||||
"Agent.OS -equals Windows_NT",
|
||||
"DotNetFramework",
|
||||
"Cmd"
|
||||
],
|
||||
"retentionRules": [
|
||||
{
|
||||
"branches": [
|
||||
"+refs/heads/*"
|
||||
],
|
||||
"artifacts": [],
|
||||
"artifactTypesToDelete": [
|
||||
"FilePath",
|
||||
"SymbolStore"
|
||||
],
|
||||
"daysToKeep": 7,
|
||||
"minimumToKeep": 1,
|
||||
"deleteBuildRecord": true,
|
||||
"deleteTestResults": true
|
||||
}
|
||||
],
|
||||
"buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)",
|
||||
"jobAuthorizationScope": "projectCollection",
|
||||
"jobTimeoutInMinutes": 90,
|
||||
"jobCancelTimeoutInMinutes": 5,
|
||||
"badgeEnabled": true,
|
||||
"repository": {
|
||||
"properties": {
|
||||
"labelSources": "0",
|
||||
"reportBuildStatus": "true",
|
||||
"fetchDepth": "0",
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "true",
|
||||
"cleanOptions": "0"
|
||||
},
|
||||
"id": "c19ea379-feb7-4ca5-8f7f-5f2b5095ea62",
|
||||
"type": "TfsGit",
|
||||
"name": "DotNet-Core-Setup-Trusted",
|
||||
"url": "https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Core-Setup-Trusted",
|
||||
"defaultBranch": "refs/heads/master",
|
||||
"clean": "false",
|
||||
"checkoutSubmodules": false
|
||||
},
|
||||
"quality": "definition",
|
||||
"queue": {
|
||||
"id": 36,
|
||||
"name": "DotNet-Build",
|
||||
"pool": {
|
||||
"id": 39,
|
||||
"name": "DotNet-Build"
|
||||
}
|
||||
},
|
||||
"id": 4371,
|
||||
"name": "Core-Setup-Windows-BT",
|
||||
"path": "\\",
|
||||
"type": "build",
|
||||
"project": {
|
||||
"id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"name": "DevDiv",
|
||||
"description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"state": "wellFormed",
|
||||
"revision": 418097676
|
||||
}
|
||||
}
|
|
@ -1,203 +0,0 @@
|
|||
{
|
||||
"build": [
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "git checkout",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "checkout $(SourceVersion)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Run script build.cmd",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "build.cmd",
|
||||
"arguments": "-Configuration Release -Targets Init,Compile,Package,Publish -TargetArch arm -Framework netcoreapp2.0 $(PB_PortableBuild)",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": true,
|
||||
"displayName": "Copy Publish Artifact: Build Logs",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "1d341bb0-2106-458c-8422-d00bcea6512a",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"CopyRoot": "",
|
||||
"Contents": "**\\*.log",
|
||||
"ArtifactName": "Build Logs",
|
||||
"ArtifactType": "Container",
|
||||
"TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
|
||||
}
|
||||
}
|
||||
],
|
||||
"options": [
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "5bc3cfb7-6b54-4a4b-b5d2-a3905949f8a6"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "7c555368-ca64-4199-add6-9ebaf0b0137d"
|
||||
},
|
||||
"inputs": {
|
||||
"multipliers": "[]",
|
||||
"parallel": "false",
|
||||
"continueOnError": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "a9db38f9-9fdc-478c-b0f9-464221e58316"
|
||||
},
|
||||
"inputs": {
|
||||
"workItemType": "4777",
|
||||
"assignToRequestor": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "57578776-4c22-4526-aeb0-86b6da17ee9c"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"NUGET_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/api/v2/package"
|
||||
},
|
||||
"NUGET_API_KEY": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"GITHUB_PASSWORD": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"COREHOST_TRACE": {
|
||||
"value": "0"
|
||||
},
|
||||
"STORAGE_ACCOUNT": {
|
||||
"value": "dotnetcli"
|
||||
},
|
||||
"STORAGE_CONTAINER": {
|
||||
"value": "dotnet"
|
||||
},
|
||||
"CONNECTION_STRING": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"PUBLISH_TO_AZURE_BLOB": {
|
||||
"value": "true",
|
||||
"allowOverride": true
|
||||
},
|
||||
"PB_PortableBuild": {
|
||||
"value": "",
|
||||
"allowOverride": true
|
||||
},
|
||||
"NUGET_SYMBOLS_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/symbols/api/v2/package"
|
||||
}
|
||||
},
|
||||
"demands": [
|
||||
"Agent.OS -equals Windows_NT",
|
||||
"DotNetFramework",
|
||||
"Cmd"
|
||||
],
|
||||
"retentionRules": [
|
||||
{
|
||||
"branches": [
|
||||
"+refs/heads/*"
|
||||
],
|
||||
"artifacts": [],
|
||||
"artifactTypesToDelete": [
|
||||
"FilePath",
|
||||
"SymbolStore"
|
||||
],
|
||||
"daysToKeep": 7,
|
||||
"minimumToKeep": 1,
|
||||
"deleteBuildRecord": true,
|
||||
"deleteTestResults": true
|
||||
}
|
||||
],
|
||||
"buildNumberFormat": "$(Date:yyyMMdd)$(Rev:.r)",
|
||||
"jobAuthorizationScope": "projectCollection",
|
||||
"jobTimeoutInMinutes": 90,
|
||||
"badgeEnabled": true,
|
||||
"repository": {
|
||||
"properties": {
|
||||
"connectedServiceId": "f4c31735-42d2-4c3a-bc47-7ac06fd0dccc",
|
||||
"apiUrl": "https://api.github.com/repos/dotnet/core-setup",
|
||||
"branchesUrl": "https://api.github.com/repos/dotnet/core-setup/branches",
|
||||
"cloneUrl": "https://github.com/dotnet/core-setup.git",
|
||||
"refsUrl": "https://api.github.com/repos/dotnet/core-setup/git/refs",
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "false",
|
||||
"fetchDepth": "0",
|
||||
"cleanOptions": "0"
|
||||
},
|
||||
"id": "https://github.com/dotnet/core-setup.git",
|
||||
"type": "GitHub",
|
||||
"name": "dotnet/core-setup",
|
||||
"url": "https://github.com/dotnet/core-setup.git",
|
||||
"defaultBranch": "master",
|
||||
"clean": "true",
|
||||
"checkoutSubmodules": false
|
||||
},
|
||||
"quality": "definition",
|
||||
"queue": {
|
||||
"pool": {
|
||||
"id": 39,
|
||||
"name": "DotNet-Build"
|
||||
},
|
||||
"id": 36,
|
||||
"name": "DotNet-Build"
|
||||
},
|
||||
"path": "\\",
|
||||
"type": "build",
|
||||
"id": 4371,
|
||||
"name": "Core-Setup-Windows-arm32",
|
||||
"project": {
|
||||
"id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"name": "DevDiv",
|
||||
"description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"state": "wellFormed",
|
||||
"revision": 418097620
|
||||
}
|
||||
}
|
|
@ -1,203 +0,0 @@
|
|||
{
|
||||
"build": [
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "git checkout",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "git",
|
||||
"arguments": "checkout $(SourceVersion)",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": false,
|
||||
"alwaysRun": false,
|
||||
"displayName": "Run script build.cmd",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "bfc8bf76-e7ac-4a8c-9a55-a944a9f632fd",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"filename": "build.cmd",
|
||||
"arguments": "-Configuration Release -Targets Init,Compile,Package,Publish -Architecure x64 -TargetArch arm64 -ToolsetDir c:\\tools\\clr -Framework netcoreapp2.0 $(PB_PortableBuild)",
|
||||
"modifyEnvironment": "false",
|
||||
"workingFolder": "",
|
||||
"failOnStandardError": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"continueOnError": true,
|
||||
"alwaysRun": true,
|
||||
"displayName": "Copy Publish Artifact: Build Logs",
|
||||
"timeoutInMinutes": 0,
|
||||
"task": {
|
||||
"id": "1d341bb0-2106-458c-8422-d00bcea6512a",
|
||||
"versionSpec": "1.*",
|
||||
"definitionType": "task"
|
||||
},
|
||||
"inputs": {
|
||||
"CopyRoot": "",
|
||||
"Contents": "**\\*.log",
|
||||
"ArtifactName": "Build Logs",
|
||||
"ArtifactType": "Container",
|
||||
"TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
|
||||
}
|
||||
}
|
||||
],
|
||||
"options": [
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "5bc3cfb7-6b54-4a4b-b5d2-a3905949f8a6"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "7c555368-ca64-4199-add6-9ebaf0b0137d"
|
||||
},
|
||||
"inputs": {
|
||||
"multipliers": "[]",
|
||||
"parallel": "false",
|
||||
"continueOnError": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "a9db38f9-9fdc-478c-b0f9-464221e58316"
|
||||
},
|
||||
"inputs": {
|
||||
"workItemType": "4777",
|
||||
"assignToRequestor": "true",
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"definition": {
|
||||
"id": "57578776-4c22-4526-aeb0-86b6da17ee9c"
|
||||
},
|
||||
"inputs": {
|
||||
"additionalFields": "{}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"variables": {
|
||||
"NUGET_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/api/v2/package"
|
||||
},
|
||||
"NUGET_API_KEY": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"GITHUB_PASSWORD": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"COREHOST_TRACE": {
|
||||
"value": "0"
|
||||
},
|
||||
"STORAGE_ACCOUNT": {
|
||||
"value": "dotnetcli"
|
||||
},
|
||||
"STORAGE_CONTAINER": {
|
||||
"value": "dotnet"
|
||||
},
|
||||
"CONNECTION_STRING": {
|
||||
"value": "PassedViaPipeBuild"
|
||||
},
|
||||
"PUBLISH_TO_AZURE_BLOB": {
|
||||
"value": "true",
|
||||
"allowOverride": true
|
||||
},
|
||||
"PB_PortableBuild": {
|
||||
"value": "",
|
||||
"allowOverride": true
|
||||
},
|
||||
"NUGET_SYMBOLS_FEED_URL": {
|
||||
"value": "https://dotnet.myget.org/F/dotnet-core/symbols/api/v2/package"
|
||||
}
|
||||
},
|
||||
"demands": [
|
||||
"Agent.OS -equals Windows_NT",
|
||||
"DotNetFramework",
|
||||
"Cmd"
|
||||
],
|
||||
"retentionRules": [
|
||||
{
|
||||
"branches": [
|
||||
"+refs/heads/*"
|
||||
],
|
||||
"artifacts": [],
|
||||
"artifactTypesToDelete": [
|
||||
"FilePath",
|
||||
"SymbolStore"
|
||||
],
|
||||
"daysToKeep": 2,
|
||||
"minimumToKeep": 1,
|
||||
"deleteBuildRecord": true,
|
||||
"deleteTestResults": true
|
||||
}
|
||||
],
|
||||
"buildNumberFormat": "$(Date:yyyMMdd)$(Rev:.r)",
|
||||
"jobAuthorizationScope": "projectCollection",
|
||||
"jobTimeoutInMinutes": 90,
|
||||
"badgeEnabled": true,
|
||||
"repository": {
|
||||
"properties": {
|
||||
"connectedServiceId": "f4c31735-42d2-4c3a-bc47-7ac06fd0dccc",
|
||||
"apiUrl": "https://api.github.com/repos/dotnet/core-setup",
|
||||
"branchesUrl": "https://api.github.com/repos/dotnet/core-setup/branches",
|
||||
"cloneUrl": "https://github.com/dotnet/core-setup.git",
|
||||
"refsUrl": "https://api.github.com/repos/dotnet/core-setup/git/refs",
|
||||
"gitLfsSupport": "false",
|
||||
"skipSyncSource": "false",
|
||||
"fetchDepth": "0",
|
||||
"cleanOptions": "0"
|
||||
},
|
||||
"id": "https://github.com/dotnet/core-setup.git",
|
||||
"type": "GitHub",
|
||||
"name": "dotnet/core-setup",
|
||||
"url": "https://github.com/dotnet/core-setup.git",
|
||||
"defaultBranch": "master",
|
||||
"clean": "true",
|
||||
"checkoutSubmodules": false
|
||||
},
|
||||
"quality": "definition",
|
||||
"queue": {
|
||||
"pool": {
|
||||
"id": 39,
|
||||
"name": "DotNet-Build"
|
||||
},
|
||||
"id": 36,
|
||||
"name": "DotNet-Build"
|
||||
},
|
||||
"path": "\\",
|
||||
"type": "build",
|
||||
"id": 4010,
|
||||
"name": "Core-Setup-Windows-arm64",
|
||||
"project": {
|
||||
"id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"name": "DevDiv",
|
||||
"description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ",
|
||||
"url": "https://devdiv.visualstudio.com/DefaultCollection/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
|
||||
"state": "wellFormed",
|
||||
"revision": 418097620
|
||||
}
|
||||
}
|
|
@ -16,9 +16,10 @@
|
|||
},
|
||||
"Definitions": [
|
||||
{
|
||||
"Name": "Core-Setup-Linux",
|
||||
"Name": "Core-Setup-Linux-BT",
|
||||
"Parameters": {
|
||||
"PB_DockerOS": "debian.8",
|
||||
"PB_DistroRid": "debian.8-x64",
|
||||
"PB_DockerTag": "debian82_prereqs_2",
|
||||
"REPO_ID": "579f8fb0fedca9aeeb399132",
|
||||
"REPO_USER": "dotnet",
|
||||
"REPO_SERVER": "azure-apt-cat.cloudapp.net"
|
||||
|
@ -30,14 +31,15 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-Linux",
|
||||
"Name": "Core-Setup-Linux-BT",
|
||||
"Parameters": {
|
||||
"PB_DockerOS": "ubuntu.14.04",
|
||||
"PB_DistroRid": "ubuntu.14.04-x64",
|
||||
"PB_DockerTag": "ubuntu1404_prereqs_v3",
|
||||
"REPO_ID": "562fbfe0b2d7d0e0a43780c4",
|
||||
"REPO_USER": "dotnet",
|
||||
"REPO_SERVER": "azure-apt-cat.cloudapp.net",
|
||||
"CLI_NUGET_FEED_URL": "https://dotnet.myget.org/F/cli-deps/api/v2/package",
|
||||
"CLI_NUGET_SYMBOLS_FEED_URL": "https://dotnet.myget.org/F/cli-deps/symbols/api/v2/package"
|
||||
"CLI_NUGET_FEED_URL": "https://dotnet.myget.org/F/dotnet-core-dev-eng/api/v2/package",
|
||||
"CLI_NUGET_SYMBOLS_FEED_URL": "https://dotnet.myget.org/F/dotnet-core-dev-eng/symbols/api/v2/package"
|
||||
},
|
||||
"ReportingParameters": {
|
||||
"OperatingSystem": "Ubuntu 14.04",
|
||||
|
@ -46,9 +48,10 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-Linux",
|
||||
"Name": "Core-Setup-Linux-BT",
|
||||
"Parameters": {
|
||||
"PB_DockerOS": "ubuntu.16.04",
|
||||
"PB_DistroRid": "ubuntu.16.04-x64",
|
||||
"PB_DockerTag": "ubuntu1604_prereqs",
|
||||
"REPO_ID": "575f40f3797ef7280505232f",
|
||||
"REPO_USER": "dotnet",
|
||||
"REPO_SERVER": "azure-apt-cat.cloudapp.net"
|
||||
|
@ -60,9 +63,10 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-Linux",
|
||||
"Name": "Core-Setup-Linux-BT",
|
||||
"Parameters": {
|
||||
"PB_DockerOS": "ubuntu.16.10",
|
||||
"PB_DistroRid": "ubuntu.16.10-x64",
|
||||
"PB_DockerTag": "ubuntu1610_prereqs_v2",
|
||||
"REPO_ID": "575f40f3797ef7280505232f",
|
||||
"REPO_USER": "dotnet",
|
||||
"REPO_SERVER": "azure-apt-cat.cloudapp.net"
|
||||
|
@ -74,7 +78,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-OSX-x64",
|
||||
"Name": "Core-Setup-OSX-BT",
|
||||
"Parameters": {
|
||||
"PB_PortableBuild": "-portable"
|
||||
},
|
||||
|
@ -86,20 +90,10 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-PortableLinux-x64",
|
||||
"Parameters": {
|
||||
"PB_PortableBuild": "-portable"
|
||||
},
|
||||
"ReportingParameters": {
|
||||
"SubType": "PortableBuild",
|
||||
"OperatingSystem": "RedHat 7",
|
||||
"Type": "build/product/",
|
||||
"Platform": "x64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-Signing-Windows-x64",
|
||||
"Name": "Core-Setup-Signing-Windows-BT",
|
||||
"Parameters": {
|
||||
"PB_DistroRid": "win7-x64",
|
||||
"PB_TargetArchitecture": "x64",
|
||||
"PB_PortableBuild": "-portable"
|
||||
},
|
||||
"ReportingParameters": {
|
||||
|
@ -110,8 +104,10 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-Signing-Windows-x86",
|
||||
"Name": "Core-Setup-Signing-Windows-BT",
|
||||
"Parameters": {
|
||||
"PB_DistroRid": "win7-x86",
|
||||
"PB_TargetArchitecture": "x86",
|
||||
"PB_PortableBuild": "-portable"
|
||||
},
|
||||
"ReportingParameters": {
|
||||
|
@ -122,23 +118,10 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-CrossBuild",
|
||||
"Name": "Core-Setup-Windows-BT",
|
||||
"Parameters": {
|
||||
"PB_DockerTag": "ubuntu-14.04-cross-0cd4667-20172211042239",
|
||||
"PB_Architecture": "arm",
|
||||
"TargetRid": "linux-arm",
|
||||
"PB_PortableBuild": "-portable"
|
||||
},
|
||||
"ReportingParameters": {
|
||||
"OperatingSystem": "Ubuntu 14.04",
|
||||
"SubType": "PortableBuild",
|
||||
"Type": "build/product/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-Windows-arm32",
|
||||
"Parameters": {
|
||||
"PB_PortableBuild": "-portable"
|
||||
"PB_AdditionalBuildArguments": "-portable",
|
||||
"PB_TargetArchitecture": "arm"
|
||||
},
|
||||
"ReportingParameters": {
|
||||
"OperatingSystem": "Windows",
|
||||
|
@ -148,8 +131,10 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"Name": "Core-Setup-Windows-arm64",
|
||||
"Name": "Core-Setup-Windows-BT",
|
||||
"Parameters": {
|
||||
"PB_AdditionalBuildArguments": "-portable",
|
||||
"PB_TargetArchitecture": "arm64",
|
||||
"PB_PortableBuild": "-portable"
|
||||
},
|
||||
"ReportingParameters": {
|
||||
|
@ -158,7 +143,7 @@
|
|||
"Type": "build/product/",
|
||||
"Platform": "arm64"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
@if not defined _echo @echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
echo Stop VBCSCompiler.exe execution.
|
||||
for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F
|
||||
|
||||
:: Strip all dashes off the argument and use invariant
|
||||
:: compare to match as many versions of "all" that we can
|
||||
:: All other argument validation happens inside Run.exe
|
||||
set NO_DASHES_ARG=%1
|
||||
if not defined NO_DASHES_ARG goto no_args
|
||||
if /I [%NO_DASHES_ARG:-=%] == [all] (
|
||||
echo Cleaning entire working directory ...
|
||||
call git clean -xdf
|
||||
exit /b !ERRORLEVEL!
|
||||
)
|
||||
:no_args
|
||||
if [%1]==[] set __args=-b
|
||||
call %~dp0run.cmd clean %__args% %*
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
:Usage
|
||||
echo.
|
||||
echo Repository cleaning script.
|
||||
echo.
|
||||
echo Options:
|
||||
echo -b - Deletes the binary output directory.
|
||||
echo -p - Deletes the repo-local nuget package directory.
|
||||
echo -c - Deletes the user-local nuget package cache.
|
||||
echo -all - Combines all of the above.
|
||||
echo.
|
||||
echo If no option is specified then clean.cmd -b is implied.
|
||||
|
||||
exit /b 1
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
set -e
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: clean [options]"
|
||||
echo "Cleans the local dev environment."
|
||||
echo
|
||||
echo " -b Delete the binary output directory."
|
||||
echo " -p Delete the repo-local NuGet package directory."
|
||||
echo " -c Delete the user-local NuGet package caches."
|
||||
echo " -all Cleans the root directory."
|
||||
echo
|
||||
echo "If no option is specified, then \"clean.sh -b\" is implied."
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ "$1" == "-?" ] || [ "$1" == "-h" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
__working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ "$*" == "-all" ]
|
||||
then
|
||||
echo "Removing all untracked files in the working tree"
|
||||
git clean -xdf $__working_tree_root
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $# == 0 ]; then
|
||||
__args=-b
|
||||
fi
|
||||
|
||||
$__working_tree_root/run.sh clean $__args $*
|
||||
exit $?
|
|
@ -0,0 +1,337 @@
|
|||
{
|
||||
"settings": {
|
||||
"OSGroup": {
|
||||
"description": "OS Group for result binaries.",
|
||||
"valueType": "property",
|
||||
"values": ["Windows_NT", "Linux", "OSX", "FreeBSD", "NetBSD"],
|
||||
"defaultValue": "Windows_NT"
|
||||
},
|
||||
"RestoreDuringBuild": {
|
||||
"description": "Enables/Disables the restoration of packages.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"Platform": {
|
||||
"description": "Sets the value of the platform.",
|
||||
"valueType": "property",
|
||||
"values": ["x86", "arm", "x64", "amd64"],
|
||||
"defaultValue": "x64"
|
||||
},
|
||||
"Architecture":{
|
||||
"description": "Build on the specified architecture (x64 or x86 (supported only on Windows), default: x64)",
|
||||
"valueType": "property",
|
||||
"values": ["x64", "x86"],
|
||||
"defaultValue": "x64"
|
||||
},
|
||||
"PortableBuild": {
|
||||
"description": "Indicates if this is a portable build.",
|
||||
"valueType": "property",
|
||||
"values": [ "True", "False"],
|
||||
"defaultValue": "False"
|
||||
},
|
||||
"DistroRid": {
|
||||
"description": "Specifies the distro rid for Unix OS.",
|
||||
"valueType": "property",
|
||||
"values": [],
|
||||
"defaultValue": "${OSRid}"
|
||||
},
|
||||
"TargetArchitecture":{
|
||||
"description": "Build for the specified architecture (x64, x86 (supported only on Windows), arm, or arm64, default: x64)",
|
||||
"valueType": "property",
|
||||
"values": ["x64", "x86", "arm", "arm64", "armel"],
|
||||
"defaultValue": "x64"
|
||||
},
|
||||
"Framework":{
|
||||
"description": "Build the specified framework (netcoreapp1.0 or netcoreapp1.1, default: netcoreapp1.0)",
|
||||
"valueType": "property",
|
||||
"values": ["netcoreapp1.0", "netcoreapp1.1", "netcoreapp2.0"],
|
||||
"defaultValue": "netcoreapp2.0"
|
||||
},
|
||||
"ConfigurationGroup": {
|
||||
"description": "Sets the configuration group as Release or Debug.",
|
||||
"valueType": "property",
|
||||
"values": ["Release", "Debug"],
|
||||
"defaultValue": "Debug"
|
||||
},
|
||||
"MsBuildLogging": {
|
||||
"description": "MsBuild logging options.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "/flp:v=normal"
|
||||
},
|
||||
"Project": {
|
||||
"description": "Project where the commands are going to be applied.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"ExtraParameters": {
|
||||
"description": "Extra parameters will be passed to the selected command.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"BatchRestorePackages": {
|
||||
"description": "MsBuild target that restores the packages.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"CleanAllProjects": {
|
||||
"description": "MsBuild target that deletes the binary output directory.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"CleanPackages": {
|
||||
"description": "MsBuild target that deletes the repo-local nuget package directory.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"CleanPackagesCache": {
|
||||
"description": "MsBuild target that deletes the user-local nuget package cache.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"GenerateNativeVersionInfo": {
|
||||
"description": "Enables generation of the native version header.",
|
||||
"valueType": "property",
|
||||
"values": ["True", "False"],
|
||||
"defaultValue": true
|
||||
},
|
||||
"GenerateVersionHeader": {
|
||||
"description": "MsBuild target that generates the version header.",
|
||||
"valueType": "target",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"CmakeBuildType": {
|
||||
"description": "Sets the value of the build configuration.",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": "Debug"
|
||||
},
|
||||
"HostOs": {
|
||||
"description": "OS for result binaries.",
|
||||
"valueType": "passThrough",
|
||||
"values": ["AnyOS", "Windows_NT", "Linux", "OSX", "FreeBSD", "NetBSD"],
|
||||
"defaultValue": "${OSName}"
|
||||
},
|
||||
"ProcessorCount": {
|
||||
"description": "Sets the value of the number of processors available.",
|
||||
"valueType": "passThrough",
|
||||
"values": ["Numeric values"],
|
||||
"defaultValue": "--numproc ${ProcessorCount}"
|
||||
},
|
||||
"AdditionalArgs": {
|
||||
"description": "Pass additional arguments to the native_build script",
|
||||
"valueType": "passThrough",
|
||||
"values": [],
|
||||
"defaultValue": ""
|
||||
},
|
||||
"SkipTests": {
|
||||
"description": "Skip running tests",
|
||||
"valueType": "property",
|
||||
"values": ["true", "false"],
|
||||
"defaultValue":false
|
||||
}
|
||||
},
|
||||
"commands": {
|
||||
"sync":{
|
||||
"alias":{
|
||||
"p":{
|
||||
"description": "Restores all NuGet packages for repository.",
|
||||
"settings":{
|
||||
"RestoreDuringBuild": true,
|
||||
"BatchRestorePackages": "default"
|
||||
}
|
||||
},
|
||||
"verbose":{
|
||||
"description": "Passes /flp:v=diag to the msbuild command or the value passed by the user.",
|
||||
"settings":{
|
||||
"MsBuildLogging": "/flp:v=diag;LogFile=sync.log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "msbuild",
|
||||
"settings": {
|
||||
"MsBuildLogging":"/flp:v=normal;LogFile=sync.log",
|
||||
"Project":"build.proj"
|
||||
}
|
||||
}
|
||||
},
|
||||
"build":{
|
||||
"alias":{
|
||||
"binaries":{
|
||||
"description": "Only builds binaries. It doesn't restore packages.",
|
||||
"settings":{
|
||||
"RestoreDuringBuild": false
|
||||
}
|
||||
},
|
||||
"GenerateVersion": {
|
||||
"description": "Generates the version header for native binaries.",
|
||||
"settings": {
|
||||
"GenerateNativeVersionInfo": true,
|
||||
"GenerateVersionHeader": "default"
|
||||
}
|
||||
},
|
||||
"debug":{
|
||||
"description": "Sets ConfigurationGroup=Debug or the value passed by the user.",
|
||||
"settings":{
|
||||
"ConfigurationGroup": "Debug"
|
||||
}
|
||||
},
|
||||
"release":{
|
||||
"description": "Sets ConfigurationGroup=Release or the value passed by the user.",
|
||||
"settings":{
|
||||
"ConfigurationGroup": "Release"
|
||||
}
|
||||
},
|
||||
"verbose":{
|
||||
"description": "Passes /flp:v=diag to the msbuild command or the value passed by the user.",
|
||||
"settings":{
|
||||
"MsBuildLogging": "/flp:v=diag"
|
||||
}
|
||||
},
|
||||
"cmakelog":{
|
||||
"description": "Writes msbuild log to cmake.log",
|
||||
"settings":{
|
||||
"MsBuildLogging": "/flp:v=diag;LogFile=msbuild-cmake.log"
|
||||
}
|
||||
},
|
||||
"os":{
|
||||
"description": "Sets OSGroup=AnyOS or the value passed by the user.",
|
||||
"settings":{
|
||||
"OSGroup": "default"
|
||||
}
|
||||
},
|
||||
"portable":{
|
||||
"description": "Make the build-native script generate binaries that are portable for the platform.",
|
||||
"settings": {
|
||||
"PortableBuild":"true"
|
||||
}
|
||||
},
|
||||
"skipTests":{
|
||||
"description": "Skips running tests",
|
||||
"settings":{
|
||||
"SkipTests": "true"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "msbuild",
|
||||
"settings": {
|
||||
"Architecture": "default",
|
||||
"TargetArchitecture": "default",
|
||||
"OSGroup": "default",
|
||||
"MsBuildLogging":"default",
|
||||
"DistroRid":"default",
|
||||
"Project":"build.proj"
|
||||
}
|
||||
}
|
||||
},
|
||||
"build-native":{
|
||||
"alias":{
|
||||
"verbose":{
|
||||
"description": "Passes /flp:v=diag to the msbuild command or the value passed by the user.",
|
||||
"settings":{
|
||||
"MsBuildLogging": "/flp:v=diag;LogFile=msbuild-cmake.log"
|
||||
}
|
||||
},
|
||||
"portable":{
|
||||
"description": "Make the build-native script generate binaries that are portable for the platform.",
|
||||
"settings": {
|
||||
"PortableBuild":"true"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "msbuild",
|
||||
"settings": {
|
||||
"Architecture": "default",
|
||||
"TargetArchitecture": "default",
|
||||
"Framework": "default",
|
||||
"OSGroup": "default",
|
||||
"MsBuildLogging":"/flp:v=n;LogFile=msbuild-cmake.log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"build-custom":{
|
||||
"alias":{
|
||||
"verbose":{
|
||||
"description": "Passes /flp:v=diag to the msbuild command or the value passed by the user.",
|
||||
"settings":{
|
||||
"MsBuildLogging": "/flp:v=diag;LogFile=msbuild.log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "msbuild",
|
||||
"settings": {
|
||||
"Architecture": "default",
|
||||
"TargetArchitecture": "default",
|
||||
"Framework": "default",
|
||||
"OSGroup": "default",
|
||||
"MsBuildLogging":"/flp:v=n;LogFile=msbuild.log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"clean":{
|
||||
"alias":{
|
||||
"b":{
|
||||
"description": "Deletes the binary output directory.",
|
||||
"settings":{
|
||||
"CleanAllProjects": "default"
|
||||
}
|
||||
},
|
||||
"p":{
|
||||
"description": "Deletes the repo-local nuget package directory.",
|
||||
"settings":{
|
||||
"CleanPackages": "default"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValues":{
|
||||
"toolName": "msbuild",
|
||||
"settings": {
|
||||
"MsBuildLogging":"/flp:v=normal;LogFile=clean.log",
|
||||
"Project":"build.proj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tools": {
|
||||
"msbuild": {
|
||||
"osSpecific":{
|
||||
"windows": {
|
||||
"defaultParameters": "/nologo /verbosity:minimal /clp:Summary /maxcpucount /nodeReuse:false",
|
||||
"path": "Tools/msbuild.cmd"
|
||||
},
|
||||
"unix":{
|
||||
"defaultParameters": "/nologo /verbosity:minimal /clp:Summary /maxcpucount /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log",
|
||||
"path": "Tools/msbuild.sh"
|
||||
}
|
||||
},
|
||||
"valueTypes": {
|
||||
"property": "/p:{name}={value}",
|
||||
"target": "/t:{name}",
|
||||
"internal": "/{name}"
|
||||
}
|
||||
},
|
||||
"terminal": {
|
||||
"osSpecific":{
|
||||
"windows": {
|
||||
"filesExtension": "cmd"
|
||||
},
|
||||
"unix":{
|
||||
"filesExtension": "sh"
|
||||
}
|
||||
},
|
||||
"valueTypes": {}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CoreCLRVersion>2.0.0-preview2-25226-02</CoreCLRVersion>
|
||||
<JitVersion>2.0.0-preview2-25226-02</JitVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Create a collection of all project.json files for dependency updates. -->
|
||||
<ItemGroup>
|
||||
<_ProjectJsonExcludes Include="$(SourceDir)test\**\project.json" />
|
||||
<_ProjectJsonExcludes Include="$(SourceDir)pkg\**\project.json" />
|
||||
<ProjectJsonFiles Include="$(SourceDir)**\project.json" Exclude="@(_ProjectJsonExcludes)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,367 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Condition="Exists('..\dir.props')" Project="..\dir.props" />
|
||||
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<!-- Branch Info -->
|
||||
<PropertyGroup>
|
||||
<MajorVersion>2</MajorVersion>
|
||||
<MinorVersion>0</MinorVersion>
|
||||
<PatchVersion>0</PatchVersion>
|
||||
<StabilizePackageVersion>false</StabilizePackageVersion>
|
||||
<LockHostVersion>false</LockHostVersion>
|
||||
<PreReleaseLabel>preview2</PreReleaseLabel>
|
||||
<ReleaseSuffix>$(PreReleaseLabel)</ReleaseSuffix>
|
||||
<Channel>master</Channel>
|
||||
<BranchName>master</BranchName>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
$(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<!-- Temp change to make OS X build behave as a Linux build -->
|
||||
<OsEnvironment Condition="'$(OsEnvironment)'=='' AND '$(OS)'=='OSX'">Unix</OsEnvironment>
|
||||
<OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Common repo directories -->
|
||||
<PropertyGroup>
|
||||
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
|
||||
<SourceDir>$(ProjectDir)src/</SourceDir>
|
||||
|
||||
<!-- Output directories -->
|
||||
<BinDir Condition="'$(BinDir)'==''">$(ProjectDir)Bin/</BinDir>
|
||||
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath>
|
||||
<ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">$(ObjDir)</BaseIntermediateOutputPath>
|
||||
|
||||
<!-- Input Directories -->
|
||||
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages/</PackagesDir>
|
||||
<ToolRuntimePath Condition="'$(ToolRuntimePath)'==''">$(ProjectDir)Tools/</ToolRuntimePath>
|
||||
<LocalToolRuntimePath Condition="'$(LocalToolRuntimePath)' == ''">$(ToolRuntimePath)local/</LocalToolRuntimePath>
|
||||
<ToolsDir Condition="'$(UseToolRuntimeForToolsDir)'=='true'">$(ToolRuntimePath)</ToolsDir>
|
||||
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
|
||||
<BuildToolsTaskDir>$(ToolRuntimePath)</BuildToolsTaskDir>
|
||||
<BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true' OR '$(MSBuildRuntimeType)' != 'Core'">$(ToolsDir)net46/</BuildToolsTaskDir>
|
||||
<LocalBuildToolsTaskDir>$(LocalToolRuntimePath)</LocalBuildToolsTaskDir>
|
||||
<LocalBuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true' OR '$(MSBuildRuntimeType)' != 'Core'">$(LocalToolRuntimePath)net46/</LocalBuildToolsTaskDir>
|
||||
<PackagingTaskDir Condition="'$(BuildToolsTaskDir)' != ''">$(BuildToolsTaskDir)</PackagingTaskDir>
|
||||
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Setting up Versioning -->
|
||||
<Import Condition="Exists('$(ToolsDir)BuildVersion.targets')" Project="$(ToolsDir)BuildVersion.targets" />
|
||||
|
||||
<!-- Versioning -->
|
||||
<PropertyGroup>
|
||||
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
|
||||
<VersionSuffix Condition="'$(PreReleaseLabel)' != ''">$(PreReleaseLabel)-</VersionSuffix>
|
||||
<VersionSuffix>$(VersionSuffix)$(BuildNumberMajor)-$(BuildNumberMinor)</VersionSuffix>
|
||||
|
||||
<ProductVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion)-$(VersionSuffix)</ProductVersion>
|
||||
<ProductionVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion)</ProductionVersion>
|
||||
|
||||
<SharedFrameworkNugetVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductionVersion)</SharedFrameworkNugetVersion>
|
||||
<SharedFrameworkNugetVersion Condition="'$(StabilizePackageVersion)' == 'false'">$(ProductVersion)</SharedFrameworkNugetVersion>
|
||||
|
||||
<NuGetVersion>$(SharedFrameworkNugetVersion)</NuGetVersion>
|
||||
<HostVersion>$(SharedFrameworkNugetVersion)</HostVersion>
|
||||
<AppHostVersion>$(SharedFrameworkNugetVersion)</AppHostVersion>
|
||||
<NetCoreAppVersion>$(SharedFrameworkNugetVersion)</NetCoreAppVersion>
|
||||
<HostResolverVersion>$(SharedFrameworkNugetVersion)</HostResolverVersion>
|
||||
<HostPolicyVersion>$(SharedFrameworkNugetVersion)</HostPolicyVersion>
|
||||
|
||||
<HostFullVersion>$(ProductVersion)</HostFullVersion>
|
||||
<HostResolverFullVersion>$(ProductVersion)</HostResolverFullVersion>
|
||||
<AppHostFullVersion>$(ProductVersion)</AppHostFullVersion>
|
||||
<HostPolicyFullVersion>$(ProductVersion)</HostPolicyFullVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Import Build tools common props file where repo-independent properties are found -->
|
||||
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
|
||||
|
||||
<!-- list of nuget package sources passed to nuget.exe -->
|
||||
<ItemGroup>
|
||||
<NuGetSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-buildtools" />
|
||||
<NuGetSourceList Include="https:%2F%2Fwww.nuget.org/api/v2" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Common nuget properties -->
|
||||
<PropertyGroup>
|
||||
<NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(ToolsDir)NuGet.CommandLine/NuGet.exe</NuGetToolPath>
|
||||
<NuGetPackageSource>@(NuGetSourceList -> '-source %(Identity)', ' ')</NuGetPackageSource>
|
||||
<NuGetConfigCommandLine>$(NuGetPackageSource)</NuGetConfigCommandLine>
|
||||
|
||||
<NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
|
||||
<NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
|
||||
<!-- NuGet.exe doesn't like trailing slashes in the output directory argument -->
|
||||
<NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('/\'.ToCharArray()))"</NugetRestoreCommand>
|
||||
<NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
|
||||
<NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
|
||||
<NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- list of nuget package sources passed to dnu -->
|
||||
<ItemGroup>
|
||||
<!-- Need to escape double forward slash (%2F) or MSBuild will normalize to one slash on Unix. -->
|
||||
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/cli-deps/api/v3/index.json" />
|
||||
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" />
|
||||
<DnuSourceList Include="https:%2F%2Fwww.myget.org/F/nugetbuild/api/v3/index.json" />
|
||||
<DnuSourceList Include="https:%2F%2Fapi.nuget.org/v3/index.json" />
|
||||
<DnuSourceList Include="https:%2F%2Fdotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- list of directories to perform batch restore -->
|
||||
<ItemGroup>
|
||||
<_DnuExcludeProjectJsonFiles Include="$(MSBuildThisFileDirectory)src\pkg\projects\**\project.json" />
|
||||
<_DnuExcludeProjectJsonFiles Include="$(MSBuildThisFileDirectory)src\test\**\project.json" />
|
||||
<_DnuExcludeProjectJsonFiles Include="$(MSBuildThisFileDirectory)Bin\**\project.json" />
|
||||
|
||||
<_ProjectJsonFiles Include="$(MSBuildThisFileDirectory)**\project.json" Exclude="@(_DnuExcludeProjectJsonFiles)" />
|
||||
<DnuRestoreDirs Include="@(_ProjectJsonFiles->'%(RootDir)%(Directory)')">
|
||||
<AdditionalArgs>%(AdditionalArgs) --disable-parallel</AdditionalArgs>
|
||||
</DnuRestoreDirs>
|
||||
<DnuRestoreDirs Include="$(MSBuildThisFileDirectory)\tools-local\setuptools\independent\">
|
||||
<AdditionalArgs>%(AdditionalArgs) --disable-parallel --infer-runtimes</AdditionalArgs>
|
||||
</DnuRestoreDirs>
|
||||
<DnuRestoreDirs Include="$(MSBuildThisFileDirectory)src/pkg/deps" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
|
||||
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
|
||||
<OverrideToolHost Condition="'$(MSBuildRuntimeType)' == 'Core'">$(DotnetToolCommand)</OverrideToolHost>
|
||||
<DnuRestoreSource>@(DnuSourceList -> '--source %(Identity)', ' ')</DnuRestoreSource>
|
||||
|
||||
<DnuRestoreCommand>"$(DotnetToolCommand)"</DnuRestoreCommand>
|
||||
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
|
||||
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('/\'.ToCharArray()))" $(DnuRestoreSource)</DnuRestoreCommand>
|
||||
<DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(BuildAllProjects)'=='true'">
|
||||
<!-- When we do a traversal build we get all packages up front, don't restore them again -->
|
||||
<RestorePackages>false</RestorePackages>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
|
||||
<Platform Condition="'$(Platform)'==''">$(TargetArchitecture)</Platform>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
Projects that have no OS-specific implementations just use Debug and Release for $(Configuration).
|
||||
Projects that do have OS-specific implementations use OS_Debug and OS_Release, for all OS's we support even
|
||||
if the code is the same between some OS's (so if you have some project that just calls POSIX APIs, we still have
|
||||
OSX_[Debug|Release] and Linux_[Debug|Release] configurations. We do this so that we place all the output under
|
||||
a single binary folder and can have a similar experience between the command line and Visual Studio.
|
||||
-->
|
||||
|
||||
<!--
|
||||
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) or $(OSGroup) or accept the defaults for them.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<OSGroup Condition="'$(OSGroup)' == ''">$(OsEnvironment)</OSGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)'==''">
|
||||
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
|
||||
<Configuration>$(ConfigurationGroup)</Configuration>
|
||||
<Configuration>$(OSGroup)_$(Configuration)</Configuration>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
If Configuration is set then someone explicitly passed it in or we building from VS. In either case
|
||||
default $(ConfigurationGroup) or $(OSGroup) from the Configuration if they aren't
|
||||
already explicitly set.
|
||||
-->
|
||||
<PropertyGroup Condition="'$(Configuration)'!=''">
|
||||
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.EndsWith('Debug'))">Debug</ConfigurationGroup>
|
||||
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.EndsWith('Release'))">Release</ConfigurationGroup>
|
||||
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
|
||||
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Windows'))">Windows_NT</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Unix'))">Unix</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Linux'))">Linux</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('OSX'))">OSX</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('FreeBSD'))">FreeBSD</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('NetBSD'))">NetBSD</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'==''">AnyOS</OSGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Set up Default symbol and optimization for Configuration -->
|
||||
<Choose>
|
||||
<When Condition="'$(ConfigurationGroup)'=='Debug'">
|
||||
<PropertyGroup>
|
||||
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
|
||||
<Optimize Condition="'$(Optimize)' == ''">false</Optimize>
|
||||
<DebugType Condition="'$(DebugType)' == ''">full</DebugType>
|
||||
<DefineConstants>$(DefineConstants),DEBUG,TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition="'$(ConfigurationGroup)' == 'Release'">
|
||||
<PropertyGroup>
|
||||
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
|
||||
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
|
||||
<DebugType Condition="'$(DebugType)' == ''">pdbonly</DebugType>
|
||||
<DefineConstants>$(DefineConstants),TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<ConfigurationErrorMsg>$(ConfigurationErrorMsg);Unknown ConfigurationGroup [$(ConfigurationGroup)] specificed in your project.</ConfigurationErrorMsg>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<PropertyGroup>
|
||||
<ExeSuffix Condition="'$(OSGroup)'=='Windows_NT'">.exe</ExeSuffix>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Framework>netcoreapp2.0</Framework>
|
||||
<Framework Condition="'$(TargetArchitecture)' == 'arm64'">netcoreapp1.1</Framework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetRid)' == '' and '$(OSGroup)' == 'Windows_NT'">
|
||||
<TargetRid Condition="'$(TargetArchitecture)' == 'x86'">win7-x86</TargetRid>
|
||||
<TargetRid Condition="'$(TargetArchitecture)' == 'x64'">win7-x64</TargetRid>
|
||||
<TargetRid Condition="'$(TargetArchitecture)' == 'arm'">win8-arm</TargetRid>
|
||||
<TargetRid Condition="'$(TargetArchitecture)' == 'arm64'">win10-arm64</TargetRid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetRid)' == '' and '$(OSGroup)' == 'OSX'">
|
||||
<TargetRid>osx.10.12-x64</TargetRid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetRid)' == '' and '$(DistroRid)' != ''">
|
||||
<TargetRid>$(DistroRid)</TargetRid>
|
||||
</PropertyGroup>
|
||||
<!-- Portable -->
|
||||
<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
|
||||
<TargetRid Condition="'$(OSGroup)' == 'Windows_NT'">win-$(TargetArchitecture)</TargetRid>
|
||||
<TargetRid Condition="'$(OSGroup)' == 'OSX'">osx-$(TargetArchitecture)</TargetRid>
|
||||
<TargetRid Condition="'$(OSGroup)' == 'Linux'">linux-$(TargetArchitecture)</TargetRid>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TestTargetRid Condition="'$(TestTargetRid)' == '' and '$(PortableBuild)' != 'true' and '$(OSGroup)' == 'Windows_NT'">win10-$(TargetArchitecture)</TestTargetRid>
|
||||
<TestTargetRid Condition="'$(TestTargetRid)' == ''">$(TargetRid)</TestTargetRid>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Set up the default output and intermediate paths -->
|
||||
<PropertyGroup>
|
||||
<OSPlatformConfig>$(TargetRid).$(ConfigurationGroup)</OSPlatformConfig>
|
||||
|
||||
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath>
|
||||
<BaseOutputRootPath>$(BaseOutputPath)$(OSPlatformConfig)\</BaseOutputRootPath>
|
||||
<OutputPath Condition="'$(OutputPath)'==''">$(BaseOutputPath)$(OSPlatformConfig)\$(MSBuildProjectName)\</OutputPath>
|
||||
|
||||
<IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(BaseIntermediateOutputPath)$(OSPlatformConfig)\</IntermediateOutputRootPath>
|
||||
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(IntermediateOutputRootPath)$(MSBuildProjectName)\</IntermediateOutputPath>
|
||||
|
||||
<CoreHostOutputDir>$(BaseOutputRootPath)corehost\</CoreHostOutputDir>
|
||||
|
||||
<PackagesBasePath Condition="'$(PackagesBasePath)'==''">$(BinDir)$(OSPlatformConfig)/</PackagesBasePath>
|
||||
<PackagesOutDir Condition="'$(PackagesOutDir)'==''">$(PackagesBasePath)packages/</PackagesOutDir>
|
||||
<SymbolPackagesOutDir Condition="'$(SymbolPackagesOutDir)'==''">$(PackagesOutDir)</SymbolPackagesOutDir>
|
||||
<PackageSymbolsBinDir Condition="'$(PackageSymbolsBinDir)' == ''">$(PackagesBasePath)symbols/</PackageSymbolsBinDir>
|
||||
|
||||
<SharedFrameworkPublishDir>$(IntermediateOutputRootPath)sharedFrameworkPublish\</SharedFrameworkPublishDir>
|
||||
<SharedFrameworkNameAndVersionRoot>$(SharedFrameworkPublishDir)shared\$(SharedFrameworkName)\$(HostVersion)</SharedFrameworkNameAndVersionRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DisableCrossgen>false</DisableCrossgen>
|
||||
<PortableLabel Condition="'$(PortableBuild)' == 'true'">_portable</PortableLabel>
|
||||
<OutputVersionBadge>$(BaseOutputRootPath)sharedfx_$(TargetRid)$(PortableLabel)_$(ConfigurationGroup)_version_badge.svg</OutputVersionBadge>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<CompressedFileExtension Condition="'$(OSGroup)' == 'Windows_NT'">.zip</CompressedFileExtension>
|
||||
<CompressedFileExtension Condition="'$(OSGroup)' != 'Windows_NT'">.tar.gz</CompressedFileExtension>
|
||||
<InstallerExtension Condition="'$(OSGroup)' == 'Windows_NT'">.msi</InstallerExtension>
|
||||
<InstallerExtension Condition="'$(OSGroup)' == 'OSX'">.pkg</InstallerExtension>
|
||||
<InstallerExtension Condition="'$(OSGroup)' != 'Windows_NT' and '$(OSGroup)' != 'OSX'">.deb</InstallerExtension>
|
||||
<CombinedInstallerExtension Condition="'$(OSGroup)' == 'Windows_NT'">.exe</CombinedInstallerExtension>
|
||||
<CombinedInstallerExtension Condition="'$(OSGroup)' != 'Windows_NT'">$(InstallerExtension)</CombinedInstallerExtension>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Disable some standard properties for building our projects -->
|
||||
<PropertyGroup>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib>
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Set up handling of build warnings -->
|
||||
<PropertyGroup>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetsWindows>false</TargetsWindows>
|
||||
<TargetsOSX>false</TargetsOSX>
|
||||
<TargetsLinux>false</TargetsLinux>
|
||||
<TargetsUnix>false</TargetsUnix>
|
||||
<TargetsUbuntu>false</TargetsUbuntu>
|
||||
<TargetsDebian>false</TargetsDebian>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="$(TargetRid.StartsWith('win'))">
|
||||
<PropertyGroup>
|
||||
<TargetsWindows>true</TargetsWindows>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetRid.StartsWith('osx'))">
|
||||
<PropertyGroup>
|
||||
<TargetsOSX>true</TargetsOSX>
|
||||
<TargetsUnix>true</TargetsUnix>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetRid.StartsWith('debian'))">
|
||||
<PropertyGroup>
|
||||
<TargetsDebian>true</TargetsDebian>
|
||||
<TargetsLinux>true</TargetsLinux>
|
||||
<TargetsUnix>true</TargetsUnix>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetRid.StartsWith('ubuntu'))">
|
||||
<PropertyGroup>
|
||||
<TargetsUbuntu>true</TargetsUbuntu>
|
||||
<TargetsLinux>true</TargetsLinux>
|
||||
<TargetsUnix>true</TargetsUnix>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<TargetsLinux>true</TargetsLinux>
|
||||
<TargetsUnix>true</TargetsUnix>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
|
||||
the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
|
||||
<_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)documentation</_TargetFrameworkDirectories>
|
||||
<_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)documentation</_FullFrameworkReferenceAssemblyPaths>
|
||||
<!-- We do not want to target a portable profile.
|
||||
TODO: Make this the default in buildtools so this is not necessary. -->
|
||||
<TargetFrameworkProfile></TargetFrameworkProfile>
|
||||
<!-- We set this property to avoid MSBuild errors regarding not setting TargetFrameworkProfile (see above line) -->
|
||||
<PortableNuGetMode>true</PortableNuGetMode>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<!-- Use Roslyn Compilers to build -->
|
||||
<Import Project="$(RoslynPropsFile)" Condition="'$(OsEnvironment)'!='Windows_NT' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" />
|
||||
<Import Project="$(RoslynPropsFile)" Condition="'$(OsEnvironment)'=='Windows_NT' and Exists('$(RoslynPropsFile)')" />
|
||||
</Project>
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<Target Name="CheckForBuildTools">
|
||||
<Error Condition="!Exists('$(ToolsDir)')"
|
||||
Text="The tools directory [$(ToolsDir)] does not exist. Please run sync in your enlistment to ensure the tools are installed before attempting to build an individual project." />
|
||||
</Target>
|
||||
|
||||
<!-- Provide default targets which can be hooked onto or overridden as necessary -->
|
||||
<Target Name="BuildAndTest" DependsOnTargets="Build;Test" />
|
||||
<Target Name="RebuildAndTest" DependsOnTargets="Rebuild;Test" />
|
||||
<Target Name="Test" />
|
||||
|
||||
<Import Project="$(ToolsDir)/Build.Common.targets" Condition="Exists('$(ToolsDir)Build.Common.targets') and '$(UseLiveBuildTools)' != 'true'" />
|
||||
|
||||
<Target Name="GetLatestCommitHash">
|
||||
<!-- Get the latest commit hash -->
|
||||
<Exec Command="git rev-parse HEAD 2>&1" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="LatestCommit" />
|
||||
<Output TaskParameter="ExitCode" PropertyName="LatestCommitExitCode" />
|
||||
</Exec>
|
||||
<!-- We shouldn't fail the build if we can't retreive the commit hash, so in this case just set it to N/A -->
|
||||
<PropertyGroup Condition="'$(LatestCommitExitCode)'!='0'">
|
||||
<LatestCommit>N/A</LatestCommit>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GetCommitCount">
|
||||
<Exec Command="git rev-list --count HEAD"
|
||||
StandardOutputImportance="Low"
|
||||
IgnoreExitCode="true"
|
||||
IgnoreStandardErrorWarningFormat="true"
|
||||
ConsoleToMSBuild="true"
|
||||
Condition="'$(CommitCount)' == ''">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="CommitCount" />
|
||||
<Output TaskParameter="ExitCode" PropertyName="CommitCountExitCode" />
|
||||
</Exec>
|
||||
<Error Condition="'$(CommitCount)' == ''" Text="Unable to determine the 'commit count'. 'Commit count' is used for generating an msi version. If you are building outside of a git repo, you must pass the '/p:CommitCount=[value]' property" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GetBundleDisplayVersion">
|
||||
<PropertyGroup>
|
||||
<BundleDisplayVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion).$(BuildNumberMajor)</BundleDisplayVersion>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<!-- Override Target from buildtools -->
|
||||
<Target Name="GenerateVersionHeader"
|
||||
Inputs="$(MSBuildProjectFile)"
|
||||
Outputs="$(NativeVersionHeaderFile)"
|
||||
DependsOnTargets="CreateVersionFileDuringBuild;GetLatestCommitHash"
|
||||
Condition="'$(NativeVersionHeaderFile)'!='' and '$(GenerateVersionHeader)'=='true' and !Exists($(NativeVersionHeaderFile))">
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Defining versioning variables -->
|
||||
<NativeVersionLines Include="#include <Windows.h>" />
|
||||
<NativeVersionLines Include="#ifndef VER_COMPANYNAME_STR" />
|
||||
<NativeVersionLines Include="#define VER_COMPANYNAME_STR "Microsoft Corporation"" />
|
||||
<NativeVersionLines Include="#endif" />
|
||||
<NativeVersionLines Include="#ifndef VER_FILEDESCRIPTION_STR" />
|
||||
<NativeVersionLines Include="#define VER_FILEDESCRIPTION_STR "$(AssemblyName)"" />
|
||||
<NativeVersionLines Include="#endif" />
|
||||
<NativeVersionLines Include="#ifndef VER_INTERNALNAME_STR" />
|
||||
<NativeVersionLines Include="#define VER_INTERNALNAME_STR VER_FILEDESCRIPTION_STR" />
|
||||
<NativeVersionLines Include="#endif" />
|
||||
<NativeVersionLines Include="#ifndef VER_ORIGINALFILENAME_STR" />
|
||||
<NativeVersionLines Include="#define VER_ORIGINALFILENAME_STR VER_FILEDESCRIPTION_STR" />
|
||||
<NativeVersionLines Include="#endif" />
|
||||
<NativeVersionLines Include="#ifndef VER_PRODUCTNAME_STR" />
|
||||
<NativeVersionLines Include="#define VER_PRODUCTNAME_STR "Microsoft\xae .NET Core Framework"" />
|
||||
<NativeVersionLines Include="#endif" />
|
||||
<NativeVersionLines Include="#undef VER_PRODUCTVERSION" />
|
||||
<NativeVersionLines Include="#define VER_PRODUCTVERSION $(MajorVersion),$(MinorVersion),$(BuildNumberMajor),$(BuildNumberMinor)" />
|
||||
<NativeVersionLines Include="#undef VER_PRODUCTVERSION_STR" />
|
||||
<NativeVersionLines Include="#define VER_PRODUCTVERSION_STR "$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)$(BuiltByString). Commit Hash%3A $(LatestCommit)"" />
|
||||
<NativeVersionLines Include="#undef VER_FILEVERSION" />
|
||||
<NativeVersionLines Include="#define VER_FILEVERSION $(MajorVersion),$(MinorVersion),$(BuildNumberMajor),$(BuildNumberMinor)" />
|
||||
<NativeVersionLines Include="#undef VER_FILEVERSION_STR" />
|
||||
<NativeVersionLines Include="#define VER_FILEVERSION_STR "$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)$(BuiltByString). Commit Hash%3A $(LatestCommit)"" />
|
||||
<NativeVersionLines Include="#ifndef VER_LEGALCOPYRIGHT_STR" />
|
||||
<NativeVersionLines Include="#define VER_LEGALCOPYRIGHT_STR "\xa9 Microsoft Corporation. All rights reserved."" />
|
||||
<NativeVersionLines Include="#endif" />
|
||||
<NativeVersionLines Include="#ifndef VER_DEBUG" />
|
||||
<NativeVersionLines Condition="'$(Configuration)'=='Debug'" Include="#define VER_DEBUG VS_FF_DEBUG" />
|
||||
<NativeVersionLines Condition="'$(Configuration)'!='Debug'" Include="#define VER_DEBUG 0" />
|
||||
<NativeVersionLines Include="#endif" />
|
||||
</ItemGroup>
|
||||
|
||||
<MakeDir Condition="!Exists('$(NativeVersionFileDir)')" Directories="$(NativeVersionFileDir)" />
|
||||
|
||||
<WriteLinesToFile
|
||||
File="$(NativeVersionHeaderFile)"
|
||||
Lines="@(NativeVersionLines)"
|
||||
Overwrite="true" />
|
||||
|
||||
<ItemGroup>
|
||||
<FileWrites Include="$(NativeVersionHeaderFile)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,102 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<Target Name="BuildAllProjects">
|
||||
<PropertyGroup>
|
||||
<DefaultBuildAllTarget Condition="'$(DefaultBuildAllTarget)'==''">$(MSBuildProjectDefaultTargets)</DefaultBuildAllTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
|
||||
however since the project names are unique it will essentially force each to run in its own batch -->
|
||||
<MSBuild Targets="$(DefaultBuildAllTarget)"
|
||||
Projects="@(Project)"
|
||||
Condition="'$(SerializeProjects)'=='true'"
|
||||
Properties="Dummy=%(Identity);DefaultBuildAllTarget=$(DefaultBuildAllTarget);BuildAllProjects=true" />
|
||||
|
||||
<MSBuild Targets="$(DefaultBuildAllTarget)"
|
||||
Projects="@(Project)"
|
||||
Condition="'$(SerializeProjects)'!='true'"
|
||||
Properties="DefaultBuildAllTarget=$(DefaultBuildAllTarget);BuildAllProjects=true"
|
||||
BuildInParallel="true"
|
||||
ContinueOnError="ErrorAndContinue" />
|
||||
|
||||
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed -->
|
||||
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanAllProjects">
|
||||
<PropertyGroup>
|
||||
<DefaultCleanAllTarget Condition="'$(DefaultCleanAllTarget)'==''">Clean</DefaultCleanAllTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
|
||||
however since the project names are unique it will essentially force each to run in its own batch -->
|
||||
<MSBuild Targets="$(DefaultCleanAllTarget)"
|
||||
Projects="@(Project)"
|
||||
Condition="'$(SerializeProjects)'=='true'"
|
||||
Properties="Dummy=%(Identity);CleanAllProjects=true"
|
||||
ContinueOnError="ErrorAndContinue" />
|
||||
|
||||
<MSBuild Targets="$(DefaultCleanAllTarget)"
|
||||
Projects="@(Project)"
|
||||
Condition="'$(SerializeProjects)'!='true'"
|
||||
Properties="CleanAllProjects=true"
|
||||
BuildInParallel="true"
|
||||
ContinueOnError="ErrorAndContinue" />
|
||||
|
||||
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed -->
|
||||
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreAllProjectPackages">
|
||||
<Message Importance="High" Text="Restoring project packages..." />
|
||||
|
||||
<PropertyGroup>
|
||||
<DefaultRestoreAllPackagesTarget Condition="'$(DefaultRestoreAllPackagesTarget)'==''">RestorePackages</DefaultRestoreAllPackagesTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- To Serialize we use msbuild's batching functionality '%' to force it to batch all similar projects with the same identity
|
||||
however since the project names are unique it will essentially force each to run in its own batch -->
|
||||
<MSBuild Targets="$(DefaultRestoreAllPackagesTarget)"
|
||||
Projects="@(Project)"
|
||||
Condition="'$(SerializeProjects)'=='true'"
|
||||
Properties="Dummy=%(Identity);RestoreAllPackages=true"
|
||||
ContinueOnError="ErrorAndContinue" />
|
||||
|
||||
<MSBuild Targets="$(DefaultRestoreAllPackagesTarget)"
|
||||
Projects="@(Project)"
|
||||
Condition="'$(SerializeProjects)'!='true'"
|
||||
Properties="RestoreAllPackages=true"
|
||||
BuildInParallel="true"
|
||||
ContinueOnError="ErrorAndContinue" />
|
||||
|
||||
<!-- Given we ErrorAndContinue we need to propagate the error if the overall task failed -->
|
||||
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" />
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<TraversalBuildDependsOn>
|
||||
$(TraversalBuildDependsOn);
|
||||
BuildAllProjects;
|
||||
</TraversalBuildDependsOn>
|
||||
|
||||
<TraversalCleanDependsOn>
|
||||
$(TraversalCleanDependsOn);
|
||||
CleanAllProjects;
|
||||
</TraversalCleanDependsOn>
|
||||
|
||||
<TraversalRestorePackagesDependsOn>
|
||||
$(TraversalRestorePackagesDependsOn)
|
||||
RestoreAllProjectPackages;
|
||||
</TraversalRestorePackagesDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="Build" DependsOnTargets="$(TraversalBuildDependsOn)" />
|
||||
|
||||
<Target Name="Clean" DependsOnTargets="$(TraversalCleanDependsOn)" />
|
||||
|
||||
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
|
||||
|
||||
<Target Name="RestorePackages" DependsOnTargets="$(TraversalRestorePackagesDependsOn)" />
|
||||
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"projects": [ "src", "test", "setuptools", "build_projects" ],
|
||||
"sdk": { "version": "1.0.0-preview2-003121" }
|
||||
"projects": [ "src", "src/managed", "test", "tools-local" ],
|
||||
"sdk": { "version": "1.0.0-preview2-003121" }
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@if "%_echo%" neq "on" echo off
|
||||
@if not defined _echo @echo off
|
||||
setlocal
|
||||
|
||||
set INIT_TOOLS_LOG=%~dp0init-tools.log
|
||||
|
@ -13,7 +13,7 @@ set PROJECT_JSON_PATH=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
|
|||
set PROJECT_JSON_FILE=%PROJECT_JSON_PATH%\project.json
|
||||
set PROJECT_JSON_CONTENTS={ "dependencies": { "Microsoft.DotNet.BuildTools": "%BUILDTOOLS_VERSION%" }, "frameworks": { "netcoreapp1.0": { } } }
|
||||
set BUILD_TOOLS_SEMAPHORE=%PROJECT_JSON_PATH%\init-tools.completed
|
||||
|
||||
set DUMMY_GLOBAL_JSON_PATH=%PACKAGES_DIR%global.json
|
||||
:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
|
||||
if [%1]==[force] (
|
||||
if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
|
||||
|
@ -32,18 +32,22 @@ 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
|
||||
|
||||
:: core-setup repo has a global.json which causes a conflict with the init-tools publish step
|
||||
if NOT exist "%PACKAGES_DIR%" mkdir %PACKAGES_DIR% > nul 2>&1
|
||||
echo { "projects": [] } > %DUMMY_GLOBAL_JSON_PATH%
|
||||
|
||||
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_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
|
||||
)
|
||||
|
||||
|
@ -51,24 +55,35 @@ if NOT exist "%DOTNET_LOCAL_PATH%" (
|
|||
|
||||
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%
|
||||
)
|
||||
|
||||
if exist %~dp0tools-override xcopy /Y/e/s %~dp0tools-override\* %TOOLRUNTIME_DIR%
|
||||
|
||||
:: 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
|
|
@ -0,0 +1,184 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
|
||||
__init_tools_log=$__scriptpath/init-tools.log
|
||||
__PACKAGES_DIR=$__scriptpath/packages
|
||||
__TOOLRUNTIME_DIR=$__scriptpath/Tools
|
||||
__DOTNET_PATH=$__TOOLRUNTIME_DIR/dotnetcli
|
||||
__DOTNET_CMD=$__DOTNET_PATH/dotnet
|
||||
if [ -z "$__BUILDTOOLS_SOURCE" ]; then __BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; fi
|
||||
__BUILD_TOOLS_PACKAGE_VERSION=$(cat $__scriptpath/BuildToolsVersion.txt)
|
||||
__DOTNET_TOOLS_VERSION=$(cat $__scriptpath/DotnetCLIVersion.txt)
|
||||
__BUILD_TOOLS_PATH=$__PACKAGES_DIR/Microsoft.DotNet.BuildTools/$__BUILD_TOOLS_PACKAGE_VERSION/lib
|
||||
__PROJECT_JSON_PATH=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION
|
||||
__PROJECT_JSON_FILE=$__PROJECT_JSON_PATH/project.json
|
||||
__PROJECT_JSON_CONTENTS="{ \"dependencies\": { \"Microsoft.DotNet.BuildTools\": \"$__BUILD_TOOLS_PACKAGE_VERSION\" }, \"frameworks\": { \"netcoreapp1.0\": { } } }"
|
||||
__INIT_TOOLS_DONE_MARKER=$__PROJECT_JSON_PATH/done
|
||||
__DUMMY_GLOBAL_JSON_PATH=$__PACKAGES_DIR/global.json
|
||||
# Extended version of platform detection logic from dotnet/cli/scripts/obtain/dotnet-install.sh 16692fc
|
||||
get_current_linux_name() {
|
||||
# Detect Distro
|
||||
if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
|
||||
if [ "$(cat /etc/*-release | grep -cim1 16.04)" -eq 1 ]; then
|
||||
echo "ubuntu.16.04"
|
||||
return 0
|
||||
fi
|
||||
if [ "$(cat /etc/*-release | grep -cim1 16.10)" -eq 1 ]; then
|
||||
echo "ubuntu.16.10"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "ubuntu"
|
||||
return 0
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
|
||||
echo "centos"
|
||||
return 0
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
|
||||
echo "rhel"
|
||||
return 0
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
|
||||
echo "debian"
|
||||
return 0
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 alpine)" -eq 1 ]; then
|
||||
echo "alpine"
|
||||
return 0
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then
|
||||
if [ "$(cat /etc/*-release | grep -cim1 23)" -eq 1 ]; then
|
||||
echo "fedora.23"
|
||||
return 0
|
||||
fi
|
||||
if [ "$(cat /etc/*-release | grep -cim1 24)" -eq 1 ]; then
|
||||
echo "fedora.24"
|
||||
return 0
|
||||
fi
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then
|
||||
if [ "$(cat /etc/*-release | grep -cim1 13.2)" -eq 1 ]; then
|
||||
echo "opensuse.13.2"
|
||||
return 0
|
||||
fi
|
||||
if [ "$(cat /etc/*-release | grep -cim1 42.1)" -eq 1 ]; then
|
||||
echo "opensuse.42.1"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Cannot determine Linux distribution, assuming Ubuntu 14.04.
|
||||
echo "ubuntu"
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ -z "$__DOTNET_PKG" ]; then
|
||||
if [ "$(uname -m | grep "i[3456]86")" = "i686" ]; then
|
||||
echo "Warning: build not supported on 32 bit Unix"
|
||||
fi
|
||||
OSName=$(uname -s)
|
||||
case $OSName in
|
||||
Darwin)
|
||||
OS=OSX
|
||||
__DOTNET_PKG=dotnet-dev-osx-x64
|
||||
ulimit -n 2048
|
||||
;;
|
||||
|
||||
Linux)
|
||||
__DOTNET_PKG="dotnet-dev-$(get_current_linux_name)-x64"
|
||||
OS=Linux
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unsupported OS '$OSName' detected. Downloading ubuntu-x64 tools."
|
||||
OS=Linux
|
||||
__DOTNET_PKG=dotnet-dev-ubuntu-x64
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
|
||||
__PATCH_CLI_NUGET_FRAMEWORKS=0
|
||||
|
||||
if [ -e $__TOOLRUNTIME_DIR ]; then rm -rf -- $__TOOLRUNTIME_DIR; fi
|
||||
echo "Running: $__scriptpath/init-tools.sh" > $__init_tools_log
|
||||
|
||||
# core-setup repo has a global.json which causes a conflict with the init-tools publish step
|
||||
if [ ! -e $__PACKAGES_DIR ]; then
|
||||
mkdir -p $__PACKAGES_DIR
|
||||
fi
|
||||
echo '{ "projects": [] }' > $__DUMMY_GLOBAL_JSON_PATH
|
||||
|
||||
if [ ! -e $__DOTNET_PATH ]; then
|
||||
|
||||
mkdir -p "$__DOTNET_PATH"
|
||||
|
||||
if [ -n "$DOTNET_TOOLSET_DIR" ] && [ -d "$DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION" ]; then
|
||||
echo "Copying $DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION to $__DOTNET_PATH" >> $__init_tools_log
|
||||
cp -r $DOTNET_TOOLSET_DIR/$__DOTNET_TOOLS_VERSION/* $__DOTNET_PATH
|
||||
elif [ -n "$DOTNET_TOOL_DIR" ] && [ -d "$DOTNET_TOOL_DIR" ]; then
|
||||
echo "Copying $DOTNET_TOOL_DIR to $__DOTNET_PATH" >> $__init_tools_log
|
||||
cp -r $DOTNET_TOOL_DIR/* $__DOTNET_PATH
|
||||
else
|
||||
echo "Installing dotnet cli..."
|
||||
__DOTNET_LOCATION="https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz"
|
||||
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
|
||||
echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" >> $__init_tools_log
|
||||
which curl > /dev/null 2> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
|
||||
else
|
||||
curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
|
||||
fi
|
||||
cd $__DOTNET_PATH
|
||||
tar -xf $__DOTNET_PATH/dotnet.tar
|
||||
|
||||
cd $__scriptpath
|
||||
|
||||
__PATCH_CLI_NUGET_FRAMEWORKS=1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ -n "$BUILD_TOOLS_TOOLSET_DIR" ] && [ -d "$BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION" ]; then
|
||||
echo "Copying $BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION to $__TOOLRUNTIME_DIR" >> $__init_tools_log
|
||||
cp -r $BUILD_TOOLS_TOOLSET_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/* $__TOOLRUNTIME_DIR
|
||||
elif [ -n "$BUILD_TOOLS_TOOL_DIR" ] && [ -d "$BUILD_TOOLS_TOOL_DIR" ]; then
|
||||
echo "Copying $BUILD_TOOLS_TOOL_DIR to $__TOOLRUNTIME_DIR" >> $__init_tools_log
|
||||
cp -r $BUILD_TOOLS_TOOL_DIR/* $__TOOLRUNTIME_DIR
|
||||
else
|
||||
if [ ! -d "$__PROJECT_JSON_PATH" ]; then mkdir "$__PROJECT_JSON_PATH"; fi
|
||||
echo $__PROJECT_JSON_CONTENTS > "$__PROJECT_JSON_FILE"
|
||||
|
||||
if [ ! -e $__BUILD_TOOLS_PATH ]; then
|
||||
echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..."
|
||||
echo "Running: $__DOTNET_CMD restore \"$__PROJECT_JSON_FILE\" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE" >> $__init_tools_log
|
||||
$__DOTNET_CMD restore "$__PROJECT_JSON_FILE" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE >> $__init_tools_log
|
||||
if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then echo "ERROR: Could not restore build tools correctly. See '$__init_tools_log' for more details."1>&2; fi
|
||||
fi
|
||||
|
||||
echo "Initializing BuildTools..."
|
||||
echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR" >> $__init_tools_log
|
||||
$__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR >> $__init_tools_log
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "ERROR: An error occured when trying to initialize the tools. Please check '$__init_tools_log' for more details."1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $__PATCH_CLI_NUGET_FRAMEWORKS -eq 1 ]; then
|
||||
echo "Updating CLI NuGet Frameworks map..."
|
||||
cp $__TOOLRUNTIME_DIR/NuGet.Frameworks.dll $__TOOLRUNTIME_DIR/dotnetcli/sdk/$__DOTNET_TOOLS_VERSION >> $__init_tools_log
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "ERROR: An error occured when updating Nuget for CLI . Please check '$__init_tools_log' for more details."1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e $__scriptpath/tools-override/crossgen.sh ]; then
|
||||
$__scriptpath/tools-override/crossgen.sh $__scriptpath/Tools
|
||||
fi
|
||||
|
||||
cp -fR $__scriptpath/tools-override/* $__TOOLRUNTIME_DIR
|
||||
|
||||
touch $__INIT_TOOLS_DONE_MARKER
|
||||
|
||||
echo "Done initializing tools."
|
||||
else
|
||||
echo "Tools are already initialized"
|
||||
fi
|
98
netci.groovy
98
netci.groovy
|
@ -10,7 +10,10 @@ def project = GithubProject
|
|||
def branch = GithubBranchName
|
||||
def isPR = true
|
||||
|
||||
def platformList = ['Debian8.2:x64:Debug', 'PortableLinux:x64:Release', 'Ubuntu:arm:Release', 'Ubuntu:x64:Release', 'Ubuntu16.04:arm:Release', 'Ubuntu16.04:x64:Release', 'Ubuntu16.10:x64:Release', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'Windows_NT:arm:Debug', 'Fedora24:x64:Debug', 'OpenSUSE42.1:x64:Debug']
|
||||
// Move these to the platform list when they are re-enabled
|
||||
// [ 'Ubuntu:arm:Release', 'Ubuntu16.04:arm:Release', 'Windows_NT:arm:Debug', ]
|
||||
|
||||
def platformList = ['Debian8.2:x64:Debug', 'PortableLinux:x64:Release', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Release', 'Ubuntu16.10:x64:Release', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'Fedora24:x64:Debug', 'OpenSUSE42.1:x64:Debug']
|
||||
|
||||
def static getBuildJobName(def configuration, def os, def architecture) {
|
||||
return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase()
|
||||
|
@ -28,17 +31,9 @@ platformList.each { platform ->
|
|||
|
||||
// Calculate build command
|
||||
if (os == 'Windows_NT') {
|
||||
if (architecture == 'arm') {
|
||||
buildCommand = ".\\build.cmd -Configuration ${configuration} -TargetArch ${architecture} -Targets Default"
|
||||
}
|
||||
else {
|
||||
buildCommand = ".\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -Targets Default"
|
||||
}
|
||||
|
||||
}
|
||||
else if (os == 'Windows_2016') {
|
||||
buildCommand = ".\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -RunInstallerTestsInDocker -Targets Default"
|
||||
buildCommand = ".\\build.cmd -ConfigurationGroup=${configuration} -TargetArchitecture=${architecture}"
|
||||
}
|
||||
/*
|
||||
else if ((os.startsWith("Ubuntu") || os.startsWith("Tizen")) &&
|
||||
(architecture == 'arm' || architecture == 'armel')) {
|
||||
def linuxcodename = '';
|
||||
|
@ -54,12 +49,13 @@ platformList.each { platform ->
|
|||
// Call the arm32_ci_script.sh script to perform the cross build by using docker
|
||||
buildCommand = "./scripts/arm32_ci_script.sh --buildConfig=${configuration} --${architecture} --linuxCodeName=${linuxcodename} --verbose"
|
||||
}
|
||||
*/
|
||||
else if (os == 'Ubuntu') {
|
||||
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --docker ubuntu.14.04 --targets Default"
|
||||
buildCommand = "./build.sh --configuration ${configuration} --docker ubuntu.14.04"
|
||||
}
|
||||
else {
|
||||
// Jenkins non-Ubuntu CI machines don't have docker
|
||||
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --targets Default"
|
||||
buildCommand = "./build.sh ${configuration}"
|
||||
|
||||
if (os == 'PortableLinux') {
|
||||
|
||||
|
@ -97,56 +93,58 @@ platformList.each { platform ->
|
|||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${contextString} Build", "(?i).*test\\W+${contextString}.*", true /* trigger on comment phrase only */)
|
||||
}
|
||||
else {
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${osForGHTrigger} ${architecture} ${configuration} Build")
|
||||
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${osForGHTrigger} ${architecture} ${configuration} Build", "(?i).*test buildtools please.*")
|
||||
}
|
||||
|
||||
ArchivalSettings settings = new ArchivalSettings();
|
||||
def archiveString = ["tar.gz", "zip", "deb", "msi", "pkg", "exe", "nupkg"].collect { "artifacts/*/packages/*.${it},artifacts/*/corehost/*.${it},pkg/bin/packages/*.${it}" }.join(",")
|
||||
def archiveString = ["tar.gz", "zip", "deb", "msi", "pkg", "exe", "nupkg"].collect { "Bin/*/packages/*.${it},Bin/*/corehost/*.${it}" }.join(",")
|
||||
settings.addFiles(archiveString)
|
||||
settings.setArchiveOnSuccess()
|
||||
settings.setFailIfNothingArchived()
|
||||
|
||||
Utilities.addArchival(newJob, settings)
|
||||
|
||||
newJob.with { disabled(false) }
|
||||
}
|
||||
|
||||
// **************************
|
||||
// Define ARM64 building.
|
||||
// **************************
|
||||
['Windows_NT'].each { os ->
|
||||
['Release'].each { configurationGroup ->
|
||||
def newJobName = "${configurationGroup.toLowerCase()}_${os.toLowerCase()}_arm64"
|
||||
def arm64Users = ['ianhays', 'kyulee1', 'gkhanna79', 'weshaggard', 'stephentoub', 'rahku', 'ramarag']
|
||||
def newJob = job(Utilities.getFullJobName(project, newJobName, /* isPR */ false)) {
|
||||
steps {
|
||||
// build the world, but don't run the tests
|
||||
batchFile("build.cmd -Configuration ${configurationGroup} -Targets Init,Compile,Package,Publish -Architecure x64 -TargetArch arm64 -ToolsetDir C:\\ats2 -Framework netcoreapp1.1")
|
||||
}
|
||||
label("arm64")
|
||||
|
||||
// Kick off the test run
|
||||
publishers {
|
||||
archiveArtifacts {
|
||||
pattern("artifacts/win10-arm64/packages/*.zip")
|
||||
pattern("artifacts/win10-arm64/corehost/*.nupkg")
|
||||
onlyIfSuccessful(true)
|
||||
allowEmpty(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set up standard options.
|
||||
Utilities.standardJobSetup(newJob, project, /* isPR */ false, "*/${branch}")
|
||||
|
||||
// Set a daily trigger
|
||||
Utilities.addPeriodicTrigger(newJob, '@daily')
|
||||
|
||||
// Set up a PR trigger that is only triggerable by certain members
|
||||
Utilities.addPrivateGithubPRTriggerForBranch(newJob, branch, "Windows_NT ARM64 ${configurationGroup} Build", "(?i).*test\\W+ARM64\\W+${os}\\W+${configurationGroup}", null, arm64Users)
|
||||
|
||||
// Set up a per-push trigger
|
||||
Utilities.addGithubPushTrigger(newJob)
|
||||
}
|
||||
}
|
||||
//['Windows_NT'].each { os ->
|
||||
// ['Release'].each { configurationGroup ->
|
||||
// def newJobName = "${configurationGroup.toLowerCase()}_${os.toLowerCase()}_arm64"
|
||||
// def arm64Users = ['ianhays', 'kyulee1', 'gkhanna79', 'weshaggard', 'stephentoub', 'rahku', 'ramarag']
|
||||
// def newJob = job(Utilities.getFullJobName(project, newJobName, /* isPR */ false)) {
|
||||
// steps {
|
||||
// // build the world, but don't run the tests
|
||||
// batchFile("build.cmd -ConfigurationGroup ${configurationGroup} -Architecure x64 -TargetArch arm64 -ToolsetDir C:\\ats2 -Framework netcoreapp1.1")
|
||||
// }
|
||||
// label("arm64")
|
||||
//
|
||||
// // Kick off the test run
|
||||
// publishers {
|
||||
// archiveArtifacts {
|
||||
// pattern("artifacts/win10-arm64/packages/*.zip")
|
||||
// pattern("artifacts/win10-arm64/corehost/*.nupkg")
|
||||
// onlyIfSuccessful(true)
|
||||
// allowEmpty(false)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // Set up standard options.
|
||||
// Utilities.standardJobSetup(newJob, project, /* isPR */ false, "*/${branch}")
|
||||
//
|
||||
// // Set a daily trigger
|
||||
// Utilities.addPeriodicTrigger(newJob, '@daily')
|
||||
//
|
||||
// // Set up a PR trigger that is only triggerable by certain members
|
||||
// Utilities.addPrivateGithubPRTriggerForBranch(newJob, branch, "Windows_NT ARM64 ${configurationGroup} Build", "(?i).*test\\W+ARM64\\W+${os}\\W+${configurationGroup}", null, arm64Users)
|
||||
//
|
||||
// // Set up a per-push trigger
|
||||
// Utilities.addGithubPushTrigger(newJob)
|
||||
// }
|
||||
//}
|
||||
|
||||
// Make the call to generate the help job
|
||||
Utilities.createHelperJob(this, project, branch,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"dotnet": {
|
||||
"projects": "src/*/project.json;test/*/project.json;scripts/*/project.json",
|
||||
"projects": "src/*/project.json;src/test/*/project.json;scripts/*/project.json",
|
||||
"enablePackageRestore": false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title styles="color:white">Welcome to the .NET Core installer.</title>
|
||||
</head>
|
||||
<body>
|
||||
<font face="Helvetica">
|
||||
<h3>
|
||||
Microsoft .NET Core
|
||||
</h3>
|
||||
<p>
|
||||
.NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.
|
||||
</p>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +0,0 @@
|
|||
/Tools/
|
||||
version.txt
|
||||
version.props
|
|
@ -1 +0,0 @@
|
|||
1.0.27-prerelease-01407-02
|
223
pkg/dir.props
223
pkg/dir.props
|
@ -1,223 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" InitialTargets="ValidateArgs" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!--
|
||||
$(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<!-- Temp change to make OS X build behave as a Linux build -->
|
||||
<OsEnvironment Condition="'$(OsEnvironment)'=='' AND '$(OS)'=='OSX'">Unix</OsEnvironment>
|
||||
<OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
|
||||
|
||||
<!-- Output directories -->
|
||||
<BinDir Condition="'$(BinDir)'==''">$(ProjectDir)bin/</BinDir>
|
||||
<ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">$(ObjDir)</BaseIntermediateOutputPath>
|
||||
|
||||
<TestWorkingDir Condition="'$(TestWorkingDir)'==''">$(BinDir)tests/</TestWorkingDir>
|
||||
<PackagesOutDir Condition="'$(PackagesOutDir)'==''">$(BinDir)packages/</PackagesOutDir>
|
||||
<SymbolPackagesOutDir Condition="'$(SymbolPackagesOutDir)'==''">$(PackagesOutDir)</SymbolPackagesOutDir>
|
||||
|
||||
<!-- Input Directories -->
|
||||
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages/</PackagesDir>
|
||||
<PackageSymbolsBinDir Condition="'$(PackageSymbolsBinDir)' == ''">$(BinDir)symbols/</PackageSymbolsBinDir>
|
||||
<ToolRuntimePath Condition="'$(ToolRuntimePath)'==''">$(ProjectDir)Tools/</ToolRuntimePath>
|
||||
<ToolsDir Condition="'$(UseToolRuntimeForToolsDir)'=='true'">$(ToolRuntimePath)</ToolsDir>
|
||||
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
|
||||
<BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true' OR '$(MSBuildRuntimeType)' != 'Core'">$(ToolsDir)net46/</BuildToolsTaskDir>
|
||||
<PackagingTaskDir Condition="'$(BuildToolsTaskDir)' != ''">$(BuildToolsTaskDir)</PackagingTaskDir>
|
||||
<UseRoslynCompilers Condition="'$(UseRoslynCompilers)'=='' and '$(OSEnvironment)'!='Windows_NT'">false</UseRoslynCompilers>
|
||||
<!-- core-setup does its own versioning -->
|
||||
<SkipVersionGeneration>true</SkipVersionGeneration>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="version.props" Condition="Exists('version.props')" />
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageOutputPath>$(PackagesOutDir)</PackageOutputPath>
|
||||
<SymbolPackageOutputPath>$(SymbolPackagesOutDir)</SymbolPackageOutputPath>
|
||||
<RuntimeIdGraphDefinitionFile>$(ProjectDir)packages\Microsoft.NETCore.Platforms\2.0.0-preview2-25226-02\runtime.json</RuntimeIdGraphDefinitionFile>
|
||||
<PackageLicenseFile>$(ProjectDir)projects/dotnet_library_license.txt</PackageLicenseFile>
|
||||
<PackageThirdPartyNoticesFile>$(ProjectDir)projects/ThirdPartyNotices.txt</PackageThirdPartyNoticesFile>
|
||||
<PackageDescriptionFile>$(ProjectDir)projects/descriptions.json</PackageDescriptionFile>
|
||||
<!-- This link should be updated for each release milestone, currently this points to 1.0.0 -->
|
||||
<ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799417</ReleaseNotes>
|
||||
<ProjectUrl>https://dot.net</ProjectUrl>
|
||||
<PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
|
||||
<PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
|
||||
|
||||
<PackageIndexFile>$(MSBuildThisFileDirectory)packageIndex.json</PackageIndexFile>
|
||||
<!-- core-setup doesn't currently use the index so don't force it to be in sync -->
|
||||
<SkipIndexCheck>true</SkipIndexCheck>
|
||||
|
||||
<Serviceable>true</Serviceable>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Add required legal files to packages -->
|
||||
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
|
||||
<File Condition="Exists('$(PackageLicenseFile)')"
|
||||
Include="$(PackageLicenseFile)" >
|
||||
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||
</File>
|
||||
<File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
|
||||
Include="$(PackageThirdPartyNoticesFile)" >
|
||||
<SkipPackageFileCheck>true</SkipPackageFileCheck>
|
||||
</File>
|
||||
<PackageIndex Include="$(PackageIndexFile)" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<PreReleaseSuffix></PreReleaseSuffix>
|
||||
<PreReleaseSuffix Condition="'$(EnsureStableVersion)'=='false'">-$(PreReleaseLabel)-$(BuildNumberMajor)-$(BuildNumberMinor)</PreReleaseSuffix>
|
||||
<HostPolicyFullVersion>$(HostPolicyVersion)$(PreReleaseSuffix)</HostPolicyFullVersion>
|
||||
<HostResolverFullVersion>$(HostResolverVersion)$(PreReleaseSuffix)</HostResolverFullVersion>
|
||||
<AppHostFullVersion>$(AppHostVersion)$(PreReleaseSuffix)</AppHostFullVersion>
|
||||
<HostFullVersion>$(HostVersion)$(PreReleaseSuffix)</HostFullVersion>
|
||||
<UWPCoreRuntimeSdkFullVersion>$(UWPCoreRuntimeSdkVersion)$(PreReleaseSuffix)</UWPCoreRuntimeSdkFullVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(ToolsDir)Build.Common.props" Condition="Exists('$(ToolsDir)Build.Common.props')" />
|
||||
|
||||
<PropertyGroup>
|
||||
<NuGetConfigFile Condition="'$(NuGetConfigFile)' == ''">$(ProjectDir)/../NuGet.Config</NuGetConfigFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DotNetTool Condition="'$(DotNetTool)' == '' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotNetTool>
|
||||
<DotNetTool Condition="'$(DotNetTool)' == '' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotNetTool>
|
||||
<OverrideToolHost Condition="'$(MSBuildRuntimeType)' == 'Core'">$(DotNetTool)</OverrideToolHost>
|
||||
<DotNetRestoreCommand>"$(DotNetTool)" restore</DotNetRestoreCommand>
|
||||
<DotNetRestoreCommand>$(DotNetRestoreCommand) --packages "$(PackagesDir.TrimEnd('/\'.ToCharArray()))"</DotNetRestoreCommand>
|
||||
<DotNetRestoreCommand>$(DotNetRestoreCommand) --configfile "$(NuGetConfigFile)"</DotNetRestoreCommand>
|
||||
<DnuRestoreCommand>$(DotNetRestoreCommand)</DnuRestoreCommand>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="ValidateArgs" Condition="'$(CLIBuildVersion)'==''">
|
||||
<Error Condition="'$(EnsureStableVersion)'==''" Text="EnsureStableVersion is undefined" />
|
||||
<Error Condition="'$(HostPolicyVersion)'==''" Text="HostPolicyVersion is undefined" />
|
||||
<Error Condition="'$(HostResolverVersion)'==''" Text="HostResolverVersion is undefined" />
|
||||
<Error Condition="'$(HostVersion)'==''" Text="HostVersion is undefined" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ValidatePreReleaseStrings" Condition="'$(EnsureStableVersion)'=='false'">
|
||||
<Error Condition="'$(PreReleaseLabel)'==''" Text="PreReleaseLabel is undefined" />
|
||||
<Error Condition="'$(BuildNumberMajor)'==''" Text="BuildNumberMajor is undefined" />
|
||||
<Error Condition="'$(BuildNumberMinor)'==''" Text="BuildNumberMinor is undefined" />
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
Projects that have no OS-specific implementations just use Debug and Release for $(Configuration).
|
||||
Projects that do have OS-specific implementations use OS_Debug and OS_Release, for all OS's we support even
|
||||
if the code is the same between some OS's (so if you have some project that just calls POSIX APIs, we still have
|
||||
OSX_[Debug|Release] and Linux_[Debug|Release] configurations. We do this so that we place all the output under
|
||||
a single binary folder and can have a similar experience between the command line and Visual Studio.
|
||||
-->
|
||||
|
||||
<!--
|
||||
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>
|
||||
|
||||
<!--
|
||||
If Configuration is set then someone explicitly passed it in or we building from VS. In either case
|
||||
default $(ConfigurationGroup), $(TargetGroup), or $(OSGroup) from the Configuration if they aren't
|
||||
already explicitly set.
|
||||
-->
|
||||
<PropertyGroup Condition="'$(Configuration)'!=''">
|
||||
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.EndsWith('Debug'))">Debug</ConfigurationGroup>
|
||||
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.EndsWith('Release'))">Release</ConfigurationGroup>
|
||||
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
|
||||
|
||||
<BuildAllOSGroups Condition="'$(BuildAllOSGroups)' == ''">true</BuildAllOSGroups>
|
||||
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Windows'))">Windows_NT</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Unix'))">Unix</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Linux'))">Linux</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('OSX'))">OSX</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('FreeBSD'))">FreeBSD</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('NetBSD'))">NetBSD</OSGroup>
|
||||
<OSGroup Condition="'$(OSGroup)'==''">AnyOS</OSGroup>
|
||||
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcore50aot'))">netcore50aot</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netstandard13aot'))">netstandard13aot</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netstandard15aot'))">netstandard15aot</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcore50'))">netcore50</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcoreapp1.0'))">netcoreapp1.0</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcoreapp1.1'))">netcoreapp1.1</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('dnxcore50'))">dnxcore50</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net463'))">net463</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net462'))">net462</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net461'))">net461</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net46'))">net46</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net45'))">net45</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net451'))">net451</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('win8'))">win8</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('wpa81'))">wpa81</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('uap101aot'))">uap101aot</TargetGroup>
|
||||
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('uap101'))">uap101</TargetGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Set up Default symbol and optimization for Configuration -->
|
||||
<Choose>
|
||||
<When Condition="'$(ConfigurationGroup)'=='Debug'">
|
||||
<PropertyGroup>
|
||||
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
|
||||
<Optimize Condition="'$(Optimize)' == ''">false</Optimize>
|
||||
<DebugType Condition="'$(DebugType)' == ''">full</DebugType>
|
||||
<DefineConstants>$(DefineConstants),DEBUG,TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition="'$(ConfigurationGroup)' == 'Release'">
|
||||
<PropertyGroup>
|
||||
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
|
||||
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
|
||||
<DebugType Condition="'$(DebugType)' == ''">pdbonly</DebugType>
|
||||
<DefineConstants>$(DefineConstants),TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<ConfigurationErrorMsg>$(ConfigurationErrorMsg);Unknown ConfigurationGroup [$(ConfigurationGroup)] specificed in your project.</ConfigurationErrorMsg>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<!-- Disable some standard properties for building our projects -->
|
||||
<PropertyGroup>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib>
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Set up handling of build warnings -->
|
||||
<PropertyGroup>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Set up the default output and intermediate paths -->
|
||||
<PropertyGroup>
|
||||
<OSPlatformConfig>$(OSGroup).$(Platform).$(ConfigurationGroup)</OSPlatformConfig>
|
||||
<TargetOutputRelPath Condition="'$(TargetGroup)'!=''">$(TargetGroup)/</TargetOutputRelPath>
|
||||
|
||||
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$(BinDir)</BaseOutputPath>
|
||||
<OutputPathSubfolder Condition="'$(IsCompatAssembly)'=='true'">/Compat</OutputPathSubfolder>
|
||||
<OutputPath Condition="'$(OutputPath)'==''">$(BaseOutputPath)$(OSPlatformConfig)/$(MSBuildProjectName)/$(TargetOutputRelPath)$(OutputPathSubfolder)</OutputPath>
|
||||
|
||||
<IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(BaseIntermediateOutputPath)$(OSPlatformConfig)/</IntermediateOutputRootPath>
|
||||
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(IntermediateOutputRootPath)$(MSBuildProjectName)/$(TargetOutputRelPath)</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<Target Name="CheckForBuildTools">
|
||||
<Error Condition="!Exists('$(ToolsDir)')"
|
||||
Text="The tools directory [$(ToolsDir)] does not exist. Please run init-tools.cmd in your enlistment to ensure the tools are installed before attempting to build an individual project." />
|
||||
</Target>
|
||||
|
||||
<!-- Provide default targets which can be hooked onto or overridden as necessary -->
|
||||
<Target Name="BuildAndTest" DependsOnTargets="Build;Test" />
|
||||
<Target Name="RebuildAndTest" DependsOnTargets="Rebuild;Test" />
|
||||
<Target Name="Test" />
|
||||
|
||||
<Import Project="$(ToolsDir)/Build.Common.targets" Condition="'$(UseLiveBuildTools)' != 'true'" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
|
||||
the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
|
||||
<_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
|
||||
<_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
|
||||
<!-- We do not want to target a portable profile.
|
||||
TODO: Make this the default in buildtools so this is not necessary. -->
|
||||
<TargetFrameworkProfile></TargetFrameworkProfile>
|
||||
<!-- We set this property to avoid MSBuild errors regarding not setting TargetFrameworkProfile (see above line) -->
|
||||
<PortableNuGetMode>true</PortableNuGetMode>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,125 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
|
||||
__init_tools_log=$__scriptpath/init-tools.log
|
||||
__PACKAGES_DIR=$__scriptpath/packages
|
||||
__TOOLRUNTIME_DIR=$__scriptpath/Tools
|
||||
__DOTNET_PATH=$__TOOLRUNTIME_DIR/dotnetcli
|
||||
__DOTNET_CMD=$__DOTNET_PATH/dotnet
|
||||
if [ -z "$__BUILDTOOLS_SOURCE" ]; then __BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; fi
|
||||
__BUILD_TOOLS_PACKAGE_VERSION=$(cat $__scriptpath/BuildToolsVersion.txt)
|
||||
__DOTNET_TOOLS_VERSION=$(cat $__scriptpath/DotnetCLIVersion.txt)
|
||||
__BUILD_TOOLS_PATH=$__PACKAGES_DIR/Microsoft.DotNet.BuildTools/$__BUILD_TOOLS_PACKAGE_VERSION/lib
|
||||
__PROJECT_JSON_PATH=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION
|
||||
__PROJECT_JSON_FILE=$__PROJECT_JSON_PATH/project.json
|
||||
__PROJECT_JSON_CONTENTS="{ \"dependencies\": { \"Microsoft.DotNet.BuildTools\": \"$__BUILD_TOOLS_PACKAGE_VERSION\" }, \"frameworks\": { \"netcoreapp1.0\": { } } }"
|
||||
__INIT_TOOLS_DONE_MARKER=$__PROJECT_JSON_PATH/done
|
||||
|
||||
# On xplat, limit HTTP parallelism to avoid restore timeouts.
|
||||
export __INIT_TOOLS_RESTORE_ARGS="--disable-parallel"
|
||||
|
||||
# Extended version of platform detection logic from dotnet/cli/scripts/obtain/dotnet-install.sh 16692fc
|
||||
get_current_linux_name() {
|
||||
# Detect Distro
|
||||
if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
|
||||
if [ "$(cat /etc/*-release | grep -cim1 16.04)" -eq 1 ]; then
|
||||
echo "ubuntu.16.04"
|
||||
return 0
|
||||
fi
|
||||
if [ "$(cat /etc/*-release | grep -cim1 16.10)" -eq 1 ]; then
|
||||
echo "ubuntu.16.10"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "ubuntu"
|
||||
return 0
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
|
||||
echo "centos"
|
||||
return 0
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
|
||||
echo "rhel"
|
||||
return 0
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
|
||||
echo "debian"
|
||||
return 0
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then
|
||||
if [ "$(cat /etc/*-release | grep -cim1 24)" -eq 1 ]; then
|
||||
echo "fedora.24"
|
||||
return 0
|
||||
fi
|
||||
elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then
|
||||
if [ "$(cat /etc/*-release | grep -cim1 42.1)" -eq 1 ]; then
|
||||
echo "opensuse.42.1"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Cannot determine Linux distribution, assuming Ubuntu 14.04.
|
||||
echo "ubuntu"
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ -z "$__DOTNET_PKG" ]; then
|
||||
OSName=$(uname -s)
|
||||
case $OSName in
|
||||
Darwin)
|
||||
OS=OSX
|
||||
__DOTNET_PKG=dotnet-dev-osx-x64
|
||||
ulimit -n 2048
|
||||
;;
|
||||
|
||||
Linux)
|
||||
__DOTNET_PKG="dotnet-dev-$(get_current_linux_name)-x64"
|
||||
OS=Linux
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unsupported OS '$OSName' detected. Downloading ubuntu-x64 tools."
|
||||
OS=Linux
|
||||
__DOTNET_PKG=dotnet-dev-ubuntu-x64
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
|
||||
if [ -e $__TOOLRUNTIME_DIR ]; then rm -rf -- $__TOOLRUNTIME_DIR; fi
|
||||
echo "Running: $__scriptpath/init-tools.sh" > $__init_tools_log
|
||||
if [ ! -e $__DOTNET_PATH ]; then
|
||||
echo "Installing dotnet cli..."
|
||||
__DOTNET_LOCATION="https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz"
|
||||
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
|
||||
echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" >> $__init_tools_log
|
||||
command -v curl > /dev/null 2> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
mkdir -p "$__DOTNET_PATH"
|
||||
wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
|
||||
else
|
||||
curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION}
|
||||
fi
|
||||
cd $__DOTNET_PATH
|
||||
tar -xf $__DOTNET_PATH/dotnet.tar
|
||||
|
||||
cd $__scriptpath
|
||||
fi
|
||||
|
||||
if [ ! -d "$__PROJECT_JSON_PATH" ]; then mkdir "$__PROJECT_JSON_PATH"; fi
|
||||
echo $__PROJECT_JSON_CONTENTS > "$__PROJECT_JSON_FILE"
|
||||
|
||||
if [ ! -e $__BUILD_TOOLS_PATH ]; then
|
||||
echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..."
|
||||
echo "Running: $__DOTNET_CMD restore \"$__PROJECT_JSON_FILE\" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE" --disable-parallel >> $__init_tools_log
|
||||
$__DOTNET_CMD restore "$__PROJECT_JSON_FILE" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE --disable-parallel >> $__init_tools_log
|
||||
if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then echo "ERROR: Could not restore build tools correctly. See '$__init_tools_log' for more details."1>&2; fi
|
||||
fi
|
||||
|
||||
echo "Initializing BuildTools..."
|
||||
echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR" >> $__init_tools_log
|
||||
$__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR >> $__init_tools_log
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "ERROR: An error occured when trying to initialize the tools. Please check '$__init_tools_log' for more details."1>&2
|
||||
exit 1
|
||||
fi
|
||||
touch $__INIT_TOOLS_DONE_MARKER
|
||||
echo "Done initializing tools."
|
||||
else
|
||||
echo "Tools are already initialized"
|
||||
fi
|
40
pkg/pack.cmd
40
pkg/pack.cmd
|
@ -1,40 +0,0 @@
|
|||
@echo off
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
set __ProjectDir=%~dp0
|
||||
set __DotNet=%__ProjectDir%\Tools\dotnetcli\dotnet.exe
|
||||
set __MSBuild=%__ProjectDir%\Tools\MSBuild.dll
|
||||
set __PortableBuildArgs=false
|
||||
|
||||
:Arg_Loop
|
||||
if "%1" == "" goto ArgsDone
|
||||
|
||||
if /i "%1" == "-portable" (set __PortableBuildArgs=true&shift&goto Arg_Loop)
|
||||
|
||||
:ArgsDone
|
||||
|
||||
:: Initialize the MSBuild Tools
|
||||
call "%__ProjectDir%\init-tools.cmd"
|
||||
if NOT [!ERRORLEVEL!]==[0] goto :Error
|
||||
|
||||
:: Restore dependencies mainly to obtain runtime.json
|
||||
pushd "%__ProjectDir%\deps"
|
||||
"%__DotNet%" restore --configfile "%__ProjectDir%\..\NuGet.Config" --packages "%__ProjectDir%\packages"
|
||||
if NOT [!ERRORLEVEL!]==[0] goto :Error
|
||||
popd
|
||||
|
||||
:: Clean up existing nupkgs
|
||||
if exist "%__ProjectDir%\bin" (rmdir /s /q "%__ProjectDir%\bin")
|
||||
|
||||
"%__DotNet%" "%__MSBuild%" "%__ProjectDir%\tasks\core-setup.tasks.builds" /verbosity:minimal /flp:logfile=tools.log;v=diag
|
||||
if NOT [!ERRORLEVEL!]==[0] goto :Error
|
||||
|
||||
:: Package the assets using Tools
|
||||
"%__DotNet%" "%__MSBuild%" "%__ProjectDir%\packages.builds" /p:OSGroup=Windows_NT /verbosity:minimal /p:PortableBuild=%__PortableBuildArgs%
|
||||
if NOT [!ERRORLEVEL!]==[0] goto :Error
|
||||
|
||||
exit /b 0
|
||||
|
||||
:Error
|
||||
echo An error occurred during packing.
|
||||
exit /b 1
|
81
pkg/pack.sh
81
pkg/pack.sh
|
@ -1,81 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $0 --rid <Runtime Identifier>"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --rid <Runtime Identifier> Target Runtime Identifier"
|
||||
echo " -portable Generate portable RID packages"
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
# determine current directory
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
|
||||
# initialize variables
|
||||
__project_dir="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
__distro_rid=
|
||||
__portableBuildArgs=
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
-h|--help)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
--rid)
|
||||
shift
|
||||
__distro_rid=$1
|
||||
;;
|
||||
-portable)
|
||||
__portableBuildArgs="/p:PortableBuild=true"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown argument to pack.sh $1"
|
||||
exit 1
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# setup msbuild
|
||||
"$__project_dir/init-tools.sh"
|
||||
|
||||
# acquire dependencies
|
||||
pushd "$__project_dir/deps"
|
||||
"$__project_dir/Tools/dotnetcli/dotnet" restore --configfile "$__project_dir/../NuGet.Config" --disable-parallel --packages "$__project_dir/packages"
|
||||
popd
|
||||
|
||||
# cleanup existing packages
|
||||
rm -rf $__project_dir/bin
|
||||
|
||||
# build to produce nupkgs
|
||||
__msbuild="$__project_dir/Tools/msbuild.sh"
|
||||
|
||||
__targets_param=
|
||||
if [ "$(uname -s)" == "Darwin" ]; then
|
||||
__targets_param="OSGroup=OSX"
|
||||
else
|
||||
__targets_param="OSGroup=Linux"
|
||||
if [ -z $__distro_rid ]; then
|
||||
echo "Runtime Identifier not defined"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
__common_parameters="/p:$__targets_param /p:DistroRid=$__distro_rid /verbosity:minimal $__portableBuildArgs"
|
||||
|
||||
$__msbuild $__project_dir/tasks/core-setup.tasks.builds $__common_parameters || exit 1
|
||||
|
||||
$__msbuild $__project_dir/packages.builds $__common_parameters || exit 1
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<ContainerName Condition="'$(ContainerName)' == ''">dotnetcli</ContainerName>
|
||||
<NuGetPushTimeoutSeconds Condition="'$(NuGetPushTimeoutSeconds)' == ''">3600</NuGetPushTimeoutSeconds>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DebInstallerFile Include="$(PackagesOutDir)*$(SharedFrameworkNuGetVersion).deb" />
|
||||
<InstallerFile Include="$(PackagesOutDir)*$(SharedFrameworkNuGetVersion)$(InstallerExtension)" />
|
||||
<InstallerFile Include="$(PackagesOutDir)*$(SharedFrameworkNuGetVersion)$(CombinedInstallerExtension)" />
|
||||
<CompressedFile Include="$(PackagesOutDir)*$(SharedFrameworkNuGetVersion)$(CompressedFileExtension)" />
|
||||
<CompressedFile Include="$(PackagesOutDir)*$(SharedFrameworkNuGetVersion).nupkg" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PublishRid Include="win7-x64"/>
|
||||
<PublishRid Include="win7-x86"/>
|
||||
<PublishRid Include="win8-arm"/>
|
||||
<PublishRid Include="win10-arm64"/>
|
||||
<PublishRid Include="osx.10.12-x64"/>
|
||||
<PublishRid Include="ubuntu.14.04-x64"/>
|
||||
<PublishRid Include="ubuntu.16.04-x64"/>
|
||||
<PublishRid Include="ubuntu.14.04-arm"/>
|
||||
<PublishRid Include="ubuntu.16.04-arm"/>
|
||||
<PublishRid Include="ubuntu.16.10-x64"/>
|
||||
<PublishRid Include="rhel.7-x64"/>
|
||||
<PublishRid Include="debian.8-x64"/>
|
||||
<PublishRid Include="fedora.23-x64"/>
|
||||
<PublishRid Include="fedora.24-x64"/>
|
||||
<PublishRid Include="opensuse.42.1-x64"/>
|
||||
<PublishRid Include="linux-x64"/>
|
||||
<PublishRid Include="linux-arm"/>
|
||||
<PublishRid Include="linux-arm64"/>
|
||||
<PublishRid Include="win-x86"/>
|
||||
<PublishRid Include="win-x64"/>
|
||||
<PublishRid Include="win-arm"/>
|
||||
<PublishRid Include="win-arm64"/>
|
||||
<PublishRid Include="osx-x64"/>
|
||||
</ItemGroup>
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="GatherPublishToAzureBinaries">
|
||||
<PropertyGroup>
|
||||
<RelativeBlobPath>$(Channel)/Binaries/$(SharedFrameworkNugetVersion)</RelativeBlobPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Project Include="publish.proj">
|
||||
<PublishTarget>UploadToAzure</PublishTarget>
|
||||
<AdditionalProperties>%(Project.AdditionalProperties);ItemsToPublish=@(CompressedFile);$(OutputVersionBadge);RelativeBlobPath=$(RelativeBlobPath)</AdditionalProperties>
|
||||
</Project>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GatherPublishToAzureInstallers">
|
||||
<PropertyGroup>
|
||||
<RelativeBlobPath>$(Channel)/Installers/$(SharedFrameworkNugetVersion)</RelativeBlobPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Project Include="publish.proj">
|
||||
<PublishTarget>UploadToAzure</PublishTarget>
|
||||
<AdditionalProperties>%(Project.AdditionalProperties);ItemsToPublish=@(InstallerFile);RelativeBlobPath=$(RelativeBlobPath)</AdditionalProperties>
|
||||
</Project>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateDebRepoFiles"
|
||||
Condition="('$(TargetsUbuntu)' == 'true' or '$(TargetsDebian)' == 'true') and '$(TargetArchitecture)' == 'x64'">
|
||||
<ItemGroup>
|
||||
<DebInstallerFile Include="$(PackagesOutDir)dotnet-host-*$(SharedFrameworkNugetVersion).deb" >
|
||||
<PackageName>dotnet-host</PackageName>
|
||||
</DebInstallerFile>
|
||||
<DebInstallerFile Include="$(PackagesOutDir)dotnet-hostfxr-*$(SharedFrameworkNugetVersion).deb" >
|
||||
<PackageName>dotnet-hostfxr</PackageName>
|
||||
</DebInstallerFile>
|
||||
<DebInstallerFile Include="$(PackagesOutDir)dotnet-sharedframework-*$(SharedFrameworkNugetVersion).deb">
|
||||
<PackageName>dotnet-sharedframework</PackageName>
|
||||
</DebInstallerFile>
|
||||
|
||||
<DebInstallerFile>
|
||||
<UploadJsonFilename>$(PackagesOutDir)%(PackageName)_package_upload.json</UploadJsonFilename>
|
||||
</DebInstallerFile>
|
||||
</ItemGroup>
|
||||
|
||||
<GenerateDebRepoUploadJsonFile RepoId="$(DebRepoId)"
|
||||
UploadJsonFilename="%(DebInstallerFile.UploadJsonFilename)"
|
||||
PackageName="%(DebInstallerFile.PackageName)"
|
||||
PackageVersion="$(SharedFrameworkNugetVersion)"
|
||||
UploadUrl="$(ContainerName)/$(Channel)/Installers/$(SharedFrameworkNugetVersion)/%(DebInstallerFile.Identity)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CheckIfAllBuildsHavePublished">
|
||||
<GetAzureBlobList AccountName="$(AzureAccountName)"
|
||||
AccountKey="$(AzureAccessToken)"
|
||||
ContainerName="$(ContainerName)"
|
||||
FilterBlobNames="$(Channel)/Binaries/$(SharedFrameworkNugetVersion)/">
|
||||
<Output TaskParameter="BlobNames" ItemName="_BlobNames" />
|
||||
</GetAzureBlobList>
|
||||
<ItemGroup>
|
||||
<_FoundBlobNames Include="%(_BlobNames.FileName)%(_BlobNames.Extension)" Condition="'%(_BlobNames.Extension)' == '.svg'" />
|
||||
<_MissingBlobNames Include="@(PublishRid->'sharedfx_%(Identity)_$(ConfigurationGroup)_version_badge.svg')"
|
||||
Exclude="@(_FoundBlobNames)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,122 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<UsingTask TaskName="DownloadBlobsFromAzure" AssemblyFile="$(LocalBuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.Local.dll" />
|
||||
<UsingTask TaskName="FinalizeBuild" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
|
||||
<UsingTask TaskName="GetAzureBlobList" AssemblyFile="$(LocalBuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.Local.dll" />
|
||||
<UsingTask TaskName="UploadToAzure" AssemblyFile="$(LocalBuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.Local.dll" />
|
||||
|
||||
<!-- ToDo: Update versions repo -->
|
||||
<Target Name="Build"
|
||||
DependsOnTargets="PublishToAzure;PublishDebFilesToDebianRepo;FinalizeBuildInAzure;PublishCoreHostPackagesToFeed" />
|
||||
|
||||
<Target Name="PublishToAzure"
|
||||
DependsOnTargets="GatherPublishToAzureBinaries;GatherPublishToAzureInstallers">
|
||||
<MSBuild Targets="%(Project.PublishTarget)"
|
||||
Projects="%(Project.Identity)"
|
||||
Properties="%(Project.AdditionalProperties)"
|
||||
BuildInParallel="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="UploadToAzure"
|
||||
Condition="'$(ItemsToPublish)' != ''">
|
||||
<Error Condition="'$(AzureAccessToken)' == ''" Text="Missing required property 'AzureAccessToken'" />
|
||||
<Error Condition="'$(AzureAccountName)' == ''" Text="Missing required property 'AzureAccountName'" />
|
||||
<Error Condition="'$(ContainerName)' == ''" Text="Missing required property 'ContainerName'" />
|
||||
<Error Condition="'$(RelativeBlobPath)' == ''" Text="Missing required property 'RelativeBlobPath'" />
|
||||
|
||||
<ItemGroup>
|
||||
<ItemsToPublish Include="$(ItemsToPublish)" />
|
||||
<ItemsToPublish>
|
||||
<RelativeBlobPath>$(RelativeBlobPath)/%(Filename)%(Extension)</RelativeBlobPath>
|
||||
</ItemsToPublish>
|
||||
</ItemGroup>
|
||||
<UploadToAzure AccountName="$(AzureAccountName)"
|
||||
AccountKey="$(AzureAccessToken)"
|
||||
ContainerName="$(ContainerName)"
|
||||
Items="@(ItemsToPublish)"
|
||||
Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PublishDebFilesToDebianRepo"
|
||||
DependsOnTargets="GenerateDebRepoFiles"
|
||||
Condition="'@(DebInstallerFile)' != ''">
|
||||
<Exec Command="$(ProjectDir)tools-local/scripts/publish/repoapi_client.sh $(DebRepoUser) $(DebRepoPass) $(DebRepoId) $(DebRepoServer) -listpkg %(DebInstallerFile.UploadJsonFilename)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="FinalizeBuildInAzure"
|
||||
DependsOnTargets="CheckIfAllBuildsHavePublished">
|
||||
<Error Condition="'$(AzureAccessToken)' == ''" Text="Missing required property 'AzureAccessToken'" />
|
||||
<Error Condition="'$(AzureAccountName)' == ''" Text="Missing required property 'AzureAccountName'" />
|
||||
<Error Condition="'$(ContainerName)' == ''" Text="Missing required property 'ContainerName'" />
|
||||
<Error Condition="'@(PublishRid)' == ''" Text="Missing required item 'PublishRid'" />
|
||||
|
||||
<Message Importance="High" Text="Finalizing Build" />
|
||||
<!-- Ensure all publish pieces are present and then publish to Azure Latest container -->
|
||||
<FinalizeBuild AccountName="$(AzureAccountName)"
|
||||
AccountKey="$(AzureAccessToken)"
|
||||
ContainerName="$(ContainerName)"
|
||||
SemaphoreBlob="$(Channel)/Binaries/sharedFxPublishSemaphore"
|
||||
Channel="$(Channel)"
|
||||
Version="$(SharedFrameworkNugetVersion)"
|
||||
PublishRids="@(PublishRid)"
|
||||
FinalizeContainer="$(Channel)/Binaries/$(SharedFrameworkNugetVersion)"
|
||||
ForcePublish="true"
|
||||
Condition="'@(_MissingBlobNames)' == ''" />
|
||||
<Message Importance="High" Condition="'@(_MissingBlobNames)' != ''" Text="Skipping finalization, missing these blobs: '@(_MissingBlobNames)'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PublishCoreHostPackagesToFeed"
|
||||
DependsOnTargets="CheckIfAllBuildsHavePublished"
|
||||
Condition="'@(_MissingBlobNames)' == ''">
|
||||
<Error Condition="'$(NuGetFeedUrl)' ==''" Text="Missing required property NuGetFeedUrl" />
|
||||
<Error Condition="'$(NuGetApiKey)' == ''" Text="Missing required property NuGetApiKey" />
|
||||
<Error Condition="'$(AzureAccessToken)' == ''" Text="Missing required property 'AzureAccessToken'" />
|
||||
<Error Condition="'$(AzureAccountName)' == ''" Text="Missing required property 'AzureAccountName'" />
|
||||
<Error Condition="'$(ContainerName)' == ''" Text="Missing required property 'ContainerName'" />
|
||||
|
||||
<GetAzureBlobList AccountName="$(AzureAccountName)"
|
||||
AccountKey="$(AzureAccessToken)"
|
||||
ContainerName="$(ContainerName)"
|
||||
FilterblobNames="$(Channel)/Binaries/$(SharedFrameworkNugetVersion)">
|
||||
<Output TaskParameter="BlobNames" ItemName="_BlobList" />
|
||||
</GetAzureBlobList>
|
||||
<ItemGroup>
|
||||
<_CoreHostPackages Include="%(_BlobList.Identity)" Condition="'%(_BlobList.Extension)' == '.nupkg'" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DownloadDirectory Condition="'$(DownloadDirectory)' == ''">$(BinDir)ForPublishing/</DownloadDirectory>
|
||||
</PropertyGroup>
|
||||
<MakeDir Directories="$(DownloadDirectory)"
|
||||
Condition="!Exists('$(DownloadDirectory)')" />
|
||||
<DownloadBlobsFromAzure AccountName="$(AzureAccountName)"
|
||||
AccountKey="$(AzureAccessToken)"
|
||||
ContainerName="$(ContainerName)"
|
||||
BlobNames="@(_CoreHostPackages)"
|
||||
DownloadDirectory="$(DownloadDirectory)" />
|
||||
<ItemGroup>
|
||||
<_DownloadedPackages Include="@(_CoreHostPackages->'$(DownloadDirectory)%(Filename)%(Extension)')" />
|
||||
<_DownloadedSymbolsPackages Include="%(_DownloadedPackages.Identity)"
|
||||
Condition="$([System.String]::new('%(_DownloadedPackages.Identity)').EndsWith('.symbols.nupkg'))" />
|
||||
<_DownloadedStandardPackages Include="@(_DownloadedPackages)"
|
||||
Exclude="@(_DownloadedSymbolsPackages)" />
|
||||
</ItemGroup>
|
||||
<Error Condition="'@(_DownloadedSymbolsPackages)' != '' and '$(NuGetSymbolsFeedUrl)' == ''" Text="Missing required property NuGetSymbolsFeedUrl" />
|
||||
|
||||
<Message Text="Pushing CoreHost packages to $(NuGetFeedUrl)" />
|
||||
<PropertyGroup>
|
||||
<NuGetPushCommand>$(NuGetToolPath) push -Source $(NuGetFeedUrl) -ApiKey $(NuGetApiKey) -Timeout $(NuGetPushTimeoutSeconds)</NuGetPushCommand>
|
||||
<NuGetPushSymbolsCommand>$(NuGetToolPath) push -Source $(NuGetSymbolsFeedUrl) -ApiKey $(NuGetApiKey) -Timeout $(NuGetPushTimeoutSeconds)</NuGetPushSymbolsCommand>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- ToDo: look at moving this to an msbuild task so that we can include retry logic, parallelize it, and hide the api key -->
|
||||
<!-- ToDo: may not be able to take a dependency on NuGet -->
|
||||
<Exec Command="$(NuGetPushCommand) %(_DownloadedStandardPackages.Identity)" />
|
||||
|
||||
<Message Condition="'@(_DownloadedSymbolsPackages)' != ''" Text="Pushing CoreHost symbols packages to $(NuGetSymbolsFeedUrl)" />
|
||||
<Exec Condition="'@(_DownloadedSymbolsPackages)' != ''" Command="$(NuGetPushSymbolsCommand) %(_DownloadedSymbolsPackages.Identity)" />
|
||||
</Target>
|
||||
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,16 @@
|
|||
@if "%_echo%" neq "on" echo off
|
||||
setlocal
|
||||
|
||||
if not defined VisualStudioVersion (
|
||||
if defined VS140COMNTOOLS (
|
||||
call "%VS140COMNTOOLS%\VsDevCmd.bat"
|
||||
goto :Run
|
||||
)
|
||||
echo Error: Visual Studio 2015 required.
|
||||
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/building/windows-instructions.md for build instructions.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:Run
|
||||
powershell -NoProfile -ExecutionPolicy unrestricted -Command "%~dp0run.ps1 -- %*"
|
||||
exit /b %ERRORLEVEL%
|
|
@ -0,0 +1,12 @@
|
|||
# set the base tools directory
|
||||
$toolsLocalPath = Join-Path $PSScriptRoot "Tools"
|
||||
$restorePackagesPath = Join-Path $PSScriptRoot "packages"
|
||||
|
||||
$initTools = Join-Path $PSScriptRoot "init-tools.cmd"
|
||||
& $initTools
|
||||
|
||||
# execute the tool using the dotnet.exe host
|
||||
$dotNetExe = Join-Path $toolsLocalPath "dotnetcli\dotnet.exe"
|
||||
$runExe = Join-Path $toolsLocalPath "run.exe"
|
||||
& $dotNetExe $runExe $args
|
||||
exit $LastExitCode
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
# Use in the the functions: eval $invocation
|
||||
invocation='echo "Calling: ${FUNCNAME[0]}"'
|
||||
__scriptpath=$(cd "$(dirname "$0")"; pwd -P)
|
||||
__toolsLocalPath=$__scriptpath/Tools
|
||||
|
||||
$__scriptpath/init-tools.sh
|
||||
|
||||
__dotnet=$__toolsLocalPath/dotnetcli/dotnet
|
||||
|
||||
cp -fR $__scriptpath/tools-override/* $__toolsLocalPath
|
||||
|
||||
$__dotnet $__toolsLocalPath/run.exe $*
|
||||
exit $?
|
|
@ -1,25 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project InitialTargets="SetSigningProperties" DefaultTargets="SignFiles" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<RepoRoot>$(MSBuildThisFileDirectory)/../../</RepoRoot>
|
||||
</PropertyGroup>
|
||||
<Import Project="dir.props" />
|
||||
|
||||
<!-- This will be overridden if we're building with MicroBuild. -->
|
||||
<Target Name="SignFiles">
|
||||
<Message Text="Fake sign target. Would sign: @(FilesToSign)" />
|
||||
</Target>
|
||||
|
||||
<Import Project="$(RepoRoot)pkg/Tools/MicroBuild.Core.props" />
|
||||
<Import Project="$(RepoRoot)pkg/Tools/MicroBuild.Core.targets" />
|
||||
<Import Project="Tools/MicroBuild.Core.props" />
|
||||
<Import Project="Tools/MicroBuild.Core.targets" />
|
||||
|
||||
<Target Name="SetSigningProperties">
|
||||
<Error Condition="'$(RID)' == ''" Text="Missing required property 'RID'." />
|
||||
<Error Condition="'$(TargetRid)' == ''" Text="Missing required property 'TargetRid'." />
|
||||
<Error Condition="'$(CertificateId)' == ''" Text="Missing required property 'CertificateId'." />
|
||||
<PropertyGroup>
|
||||
<!-- The OutDir and IntermediateOutputPath properties are required by MicroBuild. MicroBuild only
|
||||
signs files that are under these paths. -->
|
||||
<OutDir Condition="'$(OutDir)' == ''">$(RepoRoot)artifacts/$(RID)/</OutDir>
|
||||
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(OutDir)intermediate/</IntermediateOutputPath>
|
||||
<OutDir Condition="'$(OutDir)' == ''">$(BaseOutputRootPath)/</OutDir>
|
||||
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(IntermediateOutputRootPath)</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
@if "%_echo%" neq "on" echo off
|
||||
rem
|
||||
rem This file invokes cmake and generates the build system for windows.
|
||||
|
||||
set argC=0
|
||||
for %%x in (%*) do Set /A argC+=1
|
||||
|
||||
if NOT %argC%==5 GOTO :USAGE
|
||||
if %1=="/?" GOTO :USAGE
|
||||
|
||||
setlocal
|
||||
set __sourceDir=%~dp0..
|
||||
:: VS 2015 is the minimum supported toolset
|
||||
set __VSString=14 2015
|
||||
|
||||
:: Set the target architecture to a format cmake understands. ANYCPU defaults to x64
|
||||
if /i "%3" == "x86" (set cm_BaseRid=win7-x86&&set cm_Arch=I386&&set __VSString=%__VSString%)
|
||||
if /i "%3" == "x64" (set cm_BaseRid=win7-x64&&set cm_Arch=AMD64&&set __VSString=%__VSString% Win64)
|
||||
if /i "%3" == "arm" (set cm_BaseRid=win8-arm&&set cm_Arch=ARM&&set __VSString=%__VSString% ARM)
|
||||
if /i "%3" == "arm64" (set cm_BaseRid=win10-arm64&&set cm_Arch=ARM64&&set __VSString=%__VSString% Win64)
|
||||
|
||||
set __HostVersion=%4
|
||||
set __LatestCommit=%5
|
||||
|
||||
if defined CMakePath goto DoGen
|
||||
|
||||
:: Eval the output from probe-win1.ps1
|
||||
pushd "%__sourceDir%"
|
||||
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& .\Windows\probe-win.ps1"') do %%a
|
||||
popd
|
||||
|
||||
:DoGen
|
||||
echo "%CMakePath%" %__sourceDir% %__SDKVersion% "-DCLI_CMAKE_RUNTIME_ID:STRING=%cm_BaseRid%" "-DCLI_CMAKE_HOST_VER:STRING=%__HostVersion%" "-DCLI_CMAKE_APPHOST_VER:STRING=%__HostVersion%" "-DCLI_CMAKE_HOST_FXR_VER:STRING=%__HostVersion%" "-DCLI_CMAKE_HOST_POLICY_VER:STRING=%__HostVersion%" "-DCLI_CMAKE_PKG_RID:STRING=%cm_BaseRid%" "-DCLI_CMAKE_COMMIT_HASH:STRING=%__LatestCommit%" "-DCLI_CMAKE_PLATFORM_ARCH_%cm_Arch%=1" "-DCMAKE_INSTALL_PREFIX=%__CMakeBinDir%" "-DCLI_CMAKE_RESOURCE_DIR:STRING=%__ResourcesDir%" -G "Visual Studio %__VSString%"
|
||||
"%CMakePath%" %__sourceDir% %__SDKVersion% "-DCLI_CMAKE_RUNTIME_ID:STRING=%cm_BaseRid%" "-DCLI_CMAKE_HOST_VER:STRING=%__HostVersion%" "-DCLI_CMAKE_APPHOST_VER:STRING=%__HostVersion%" "-DCLI_CMAKE_HOST_FXR_VER:STRING=%__HostVersion%" "-DCLI_CMAKE_HOST_POLICY_VER:STRING=%__HostVersion%" "-DCLI_CMAKE_PKG_RID:STRING=%cm_BaseRid%" "-DCLI_CMAKE_COMMIT_HASH:STRING=%__LatestCommit%" "-DCLI_CMAKE_PLATFORM_ARCH_%cm_Arch%=1" "-DCMAKE_INSTALL_PREFIX=%__CMakeBinDir%" "-DCLI_CMAKE_RESOURCE_DIR:STRING=%__ResourcesDir%" -G "Visual Studio %__VSString%"
|
||||
endlocal
|
||||
GOTO :DONE
|
||||
|
||||
:USAGE
|
||||
echo "Usage..."
|
||||
echo "gen-buildsys-win.bat <path to top level CMakeLists.txt> <VSVersion> <Target Architecture>"
|
||||
echo "Specify the path to the top level CMake file - <ProjectK>/src/NDP"
|
||||
echo "Specify the VSVersion to be used - VS2013 or VS2015"
|
||||
echo "Specify the Target Architecture - x86, AnyCPU, ARM, or x64."
|
||||
echo "Specify the host version"
|
||||
echo "Specify latest commit hash"
|
||||
EXIT /B 1
|
||||
|
||||
:DONE
|
||||
EXIT /B 0
|
|
@ -0,0 +1,65 @@
|
|||
# This file probes for the prerequisites for the build system, and outputs commands for eval'ing
|
||||
# from the cmd scripts to set variables (and exit on error)
|
||||
|
||||
function GetCMakeVersions
|
||||
{
|
||||
$items = @()
|
||||
$items += @(Get-ChildItem hklm:\SOFTWARE\Wow6432Node\Kitware -ErrorAction SilentlyContinue)
|
||||
$items += @(Get-ChildItem hklm:\SOFTWARE\Kitware -ErrorAction SilentlyContinue)
|
||||
return $items | Where-Object { $_.PSChildName.StartsWith("CMake ") }
|
||||
}
|
||||
|
||||
function GetCMakeInfo($regKey)
|
||||
{
|
||||
# This no longer works for versions 3.5+
|
||||
try {
|
||||
$version = [System.Version] $regKey.PSChildName.Split(' ')[1]
|
||||
}
|
||||
catch {
|
||||
return $null
|
||||
}
|
||||
$cmakeDir = (Get-ItemProperty $regKey.PSPath).'(default)'
|
||||
$cmakePath = [System.IO.Path]::Combine($cmakeDir, "bin\cmake.exe")
|
||||
if (![System.IO.File]::Exists($cmakePath)) {
|
||||
return $null
|
||||
}
|
||||
return @{'version' = $version; 'path' = $cmakePath}
|
||||
}
|
||||
|
||||
function LocateCMake
|
||||
{
|
||||
$errorMsg = "CMake is a pre-requisite to build this repository but it was not found on the path. Please install CMake from http://www.cmake.org/download/ and ensure it is on your path."
|
||||
$inPathPath = (get-command cmake.exe -ErrorAction SilentlyContinue).Path
|
||||
if ($inPathPath -ne $null) {
|
||||
return $inPathPath
|
||||
}
|
||||
# Check the default installation directory
|
||||
$inDefaultDir = [System.IO.Path]::Combine(${Env:ProgramFiles(x86)}, "CMake\bin\cmake.exe")
|
||||
if ([System.IO.File]::Exists($inDefaultDir)) {
|
||||
return $inDefaultDir
|
||||
}
|
||||
# Let us hope that CMake keep using their current version scheme
|
||||
$validVersions = @()
|
||||
foreach ($regKey in GetCMakeVersions) {
|
||||
$info = GetCMakeInfo($regKey)
|
||||
if ($info -ne $null) {
|
||||
$validVersions += @($info)
|
||||
}
|
||||
}
|
||||
$newestCMakePath = ($validVersions |
|
||||
Sort-Object -property @{Expression={$_.version}; Ascending=$false} |
|
||||
Select-Object -first 1).path
|
||||
if ($newestCMakePath -eq $null) {
|
||||
Throw $errorMsg
|
||||
}
|
||||
return $newestCMakePath
|
||||
}
|
||||
|
||||
try {
|
||||
$cmakePath = LocateCMake
|
||||
[System.Console]::WriteLine("set CMakePath=" + $cmakePath)
|
||||
}
|
||||
catch {
|
||||
[System.Console]::Error.WriteLine($_.Exception.Message)
|
||||
[System.Console]::WriteLine("exit /b 1")
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
@if not defined _echo @echo off
|
||||
setlocal
|
||||
|
||||
:SetupArgs
|
||||
:: Initialize the args that will be passed to cmake
|
||||
set __nativeWindowsDir=%~dp0Windows
|
||||
set __binDir=%~dp0..\..\Bin
|
||||
set __rootDir=%~dp0..\..
|
||||
set __CMakeBinDir=""
|
||||
set __IntermediatesDir=""
|
||||
set __BuildArch=x64
|
||||
set __appContainer=""
|
||||
set __VCBuildArch=x86_amd64
|
||||
set CMAKE_BUILD_TYPE=Debug
|
||||
set "__LinkArgs= "
|
||||
set "__LinkLibraries= "
|
||||
|
||||
:Arg_Loop
|
||||
if [%1] == [] goto :ToolsVersion
|
||||
if /i [%1] == [Release] ( set CMAKE_BUILD_TYPE=Release&&shift&goto Arg_Loop)
|
||||
if /i [%1] == [Debug] ( set CMAKE_BUILD_TYPE=Debug&&shift&goto Arg_Loop)
|
||||
|
||||
if /i [%1] == [AnyCPU] ( set __BuildArch=x64&&set __VCBuildArch=x86_amd64&&shift&goto Arg_Loop)
|
||||
if /i [%1] == [x86] ( set __BuildArch=x86&&set __VCBuildArch=x86&&shift&goto Arg_Loop)
|
||||
if /i [%1] == [arm] ( set __BuildArch=arm&&set __VCBuildArch=x86_arm&&set __SDKVersion="-DCMAKE_SYSTEM_VERSION=10.0"&&shift&goto Arg_Loop)
|
||||
if /i [%1] == [x64] ( set __BuildArch=x64&&set __VCBuildArch=x86_amd64&&shift&goto Arg_Loop)
|
||||
if /i [%1] == [amd64] ( set __BuildArch=x64&&set __VCBuildArch=x86_amd64&&shift&goto Arg_Loop)
|
||||
if /i [%1] == [arm64] ( set __BuildArch=arm64&&set __VCBuildArch=arm64&&shift&goto Arg_Loop)
|
||||
|
||||
if /i [%1] == [rid] ( set __TargetRid=%2&&shift&&shift&goto Arg_Loop)
|
||||
if /i [%1] == [toolsetDir] ( set "__ToolsetDir=%2"&&shift&&shift&goto Arg_Loop)
|
||||
if /i [%1] == [version] (set __HostVersion=%2&&shift&&shift&goto Arg_Loop)
|
||||
if /i [%1] == [commit] (set __CommitSha=%2&&shift&&shift&goto Arg_Loop)
|
||||
|
||||
shift
|
||||
goto :Arg_Loop
|
||||
|
||||
:ToolsVersion
|
||||
:: Determine the tools version to pass to cmake/msbuild
|
||||
if not defined VisualStudioVersion (
|
||||
if defined VS140COMNTOOLS (
|
||||
goto :VS2015
|
||||
)
|
||||
goto :MissingVersion
|
||||
)
|
||||
if "%VisualStudioVersion%"=="14.0" (
|
||||
goto :VS2015
|
||||
)
|
||||
|
||||
:MissingVersion
|
||||
:: Can't find VS 2013+
|
||||
echo Error: Visual Studio 2015 required
|
||||
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
|
||||
exit /b 1
|
||||
|
||||
:VS2015
|
||||
:: Setup vars for VS2015
|
||||
set __VSVersion=vs2015
|
||||
set __PlatformToolset=v140
|
||||
if NOT "%__BuildArch%" == "arm64" (
|
||||
:: Set the environment for the native build
|
||||
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %__VCBuildArch%
|
||||
)
|
||||
goto :SetupDirs
|
||||
|
||||
:SetupDirs
|
||||
:: Setup to cmake the native components
|
||||
echo Commencing build of corehost
|
||||
echo.
|
||||
|
||||
if %__CMakeBinDir% == "" (
|
||||
set "__CMakeBinDir=%__binDir%\%__TargetRid%.%CMAKE_BUILD_TYPE%\corehost"
|
||||
)
|
||||
if %__IntermediatesDir% == "" (
|
||||
set "__IntermediatesDir=%__binDir%\obj\%__TargetRid%.%CMAKE_BUILD_TYPE%\corehost"
|
||||
)
|
||||
set "__ResourcesDir=%__binDir%\obj\%__TargetRid%.%CMAKE_BUILD_TYPE%\hostResourceFiles%
|
||||
set "__CMakeBinDir=%__CMakeBinDir:\=/%"
|
||||
set "__IntermediatesDir=%__IntermediatesDir:\=/%"
|
||||
|
||||
|
||||
:: Check that the intermediate directory exists so we can place our cmake build tree there
|
||||
if exist "%__IntermediatesDir%" rd /s /q "%__IntermediatesDir%"
|
||||
if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%"
|
||||
|
||||
if exist "%VSINSTALLDIR%DIA SDK" goto GenVSSolution
|
||||
echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^
|
||||
This is due to a bug in the Visual Studio installer. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^
|
||||
at VS install location of previous version. Workaround is to copy DIA SDK folder from VS install location ^
|
||||
of previous version to "%VSINSTALLDIR%" and then resume build.
|
||||
:: DIA SDK not included in Express editions
|
||||
echo Visual Studio 2013 Express does not include the DIA SDK. ^
|
||||
You need Visual Studio 2013+ (Community is free).
|
||||
echo See: https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md#prerequisites
|
||||
exit /b 1
|
||||
|
||||
:GenVSSolution
|
||||
:: Regenerate the VS solution
|
||||
|
||||
if /i "%__BuildArch%" == "arm64" (
|
||||
REM arm64 builds currently use private toolset which has not been released yet
|
||||
REM TODO, remove once the toolset is open.
|
||||
call :PrivateToolSet
|
||||
)
|
||||
|
||||
echo Calling "%__nativeWindowsDir%\gen-buildsys-win.bat %~dp0 %__VSVersion% %__BuildArch% %__HostVersion% %__CommitSha%"
|
||||
pushd "%__IntermediatesDir%"
|
||||
call "%__nativeWindowsDir%\gen-buildsys-win.bat" %~dp0 %__VSVersion% %__BuildArch% %__HostVersion% %__CommitSha%
|
||||
popd
|
||||
|
||||
:CheckForProj
|
||||
:: Check that the project created by Cmake exists
|
||||
if exist "%__IntermediatesDir%\ALL_BUILD.vcxproj" goto BuildNativeProj
|
||||
goto :Failure
|
||||
|
||||
:BuildNativeProj
|
||||
:: Build the project created by Cmake
|
||||
if "%__BuildArch%" == "arm64" (
|
||||
set __msbuildArgs=/p:UseEnv=true
|
||||
) else (
|
||||
set __msbuildArgs=/p:Platform=%__BuildArch% /p:PlatformToolset="%__PlatformToolset%"
|
||||
)
|
||||
|
||||
cd %__rootDir%
|
||||
|
||||
echo %__rootDir%\run.cmd build-native -- "%__IntermediatesDir%\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=%CMAKE_BUILD_TYPE% %__msbuildArgs%
|
||||
call %__rootDir%\run.cmd build-native -- "%__IntermediatesDir%\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=%CMAKE_BUILD_TYPE% %__msbuildArgs%
|
||||
IF ERRORLEVEL 1 (
|
||||
goto :Failure
|
||||
)
|
||||
echo Done building Native components
|
||||
exit /B 0
|
||||
|
||||
:Failure
|
||||
:: Build failed
|
||||
echo Failed to generate native component build project!
|
||||
exit /b 1
|
||||
|
||||
:PrivateToolSet
|
||||
echo %__MsgPrefix% Setting Up the usage of __ToolsetDir:%__ToolsetDir%
|
||||
|
||||
if /i "%__ToolsetDir%" == "" (
|
||||
echo %__MsgPrefix%Error: A toolset directory is required for the Arm64 Windows build. Use the toolsetDir argument.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set PATH=%__ToolsetDir%\VC_sdk\bin;%PATH%
|
||||
set LIB=%__ToolsetDir%\VC_sdk\lib\arm64;%__ToolsetDir%\sdpublic\sdk\lib\arm64
|
||||
set INCLUDE=^
|
||||
%__ToolsetDir%\VC_sdk\inc;^
|
||||
%__ToolsetDir%\sdpublic\sdk\inc;^
|
||||
%__ToolsetDir%\sdpublic\shared\inc;^
|
||||
%__ToolsetDir%\sdpublic\shared\inc\minwin;^
|
||||
%__ToolsetDir%\sdpublic\sdk\inc\ucrt;^
|
||||
%__ToolsetDir%\sdpublic\sdk\inc\minwin;^
|
||||
%__ToolsetDir%\sdpublic\sdk\inc\mincore;^
|
||||
%__ToolsetDir%\sdpublic\sdk\inc\abi;^
|
||||
%__ToolsetDir%\sdpublic\sdk\inc\clientcore;^
|
||||
%__ToolsetDir%\diasdk\include
|
||||
exit /b 0
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="dir.props" />
|
||||
<Import Project="..\..\dir.targets" />
|
||||
<Import Project="..\..\dir.traversal.targets" />
|
||||
|
||||
<!-- Target that builds dotnet, hostfxr and hostpolicy -->
|
||||
<Target Name="Build" DependsOnTargets="BuildCoreHostUnix;BuildCoreHostWindows" />
|
||||
|
||||
|
||||
<Target Name="BuildCoreHostUnix"
|
||||
Condition="'$(OSGroup)' != 'Windows_NT'"
|
||||
DependsOnTargets="GetLatestCommitHash">
|
||||
<PropertyGroup>
|
||||
<BuildArgs>--arch $(TargetArchitecture) --apphostver $(HostVersion) --hostver $(HostVersion) --fxrver $(HostVersion) --policyver $(HostVersion) --commithash $(LatestCommit)</BuildArgs>
|
||||
<BuildArgs Condition="'$(PortableBuild)' == 'true'">$(BuildArgs) -portable</BuildArgs>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Text="$(MSBuildProjectDirectory)\build.sh $(BuildArgs)" Importance="High"/>
|
||||
<Exec Command="$(MSBuildProjectDirectory)\build.sh $(BuildArgs)" />
|
||||
|
||||
<ItemGroup>
|
||||
<CMakeOutput Include="$(MSBuildProjectDirectory)\cli\exe\dotnet\dotnet" />
|
||||
<CMakeOutput Include="$(MSBuildProjectDirectory)\cli\exe\apphost\apphost" />
|
||||
<CMakeOutput Include="$(MSBuildProjectDirectory)\cli\dll\$(HostPolicyBaseName)" />
|
||||
<CMakeOutput Include="$(MSBuildProjectDirectory)\cli\fxr\$(DotnetHostFxrBaseName)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(CMakeOutput)"
|
||||
DestinationFolder="$(CoreHostOutputDir)"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildCoreHostWindows"
|
||||
Condition="'$(OSGroup)' == 'Windows_NT'"
|
||||
DependsOnTargets="GetLatestCommitHash">
|
||||
|
||||
<!-- Generate Version files -->
|
||||
<ItemGroup>
|
||||
<HostFiles Include="apphost;dotnet;hostfxr;hostpolicy" />
|
||||
</ItemGroup>
|
||||
<MSBuild Projects="$(MSBuildProjectFullPath)"
|
||||
Properties="GenerateNativeVersionInfo=true;AssemblyName=%(HostFiles.Identity);NativeVersionFileDir=$(IntermediateOutputRootPath)hostResourceFiles\%(HostFiles.Identity);NativeVersionHeaderFile=$(IntermediateOutputRootPath)hostResourceFiles\%(HostFiles.Identity)\version_info.h"
|
||||
Targets="GenerateVersionHeader" />
|
||||
<PropertyGroup>
|
||||
<BuildArgs>$(ConfigurationGroup) $(TargetArchitecture) version $(HostVersion) commit $(LatestCommit) rid $(TargetRid)</BuildArgs>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Run script that invokes Cmake to create VS files, and then calls msbuild to compile them -->
|
||||
<Message Text="$(MSBuildProjectDirectory)\build.cmd $(BuildArgs)" Importance="High"/>
|
||||
<Exec Command="$(MSBuildProjectDirectory)\build.cmd $(BuildArgs)" />
|
||||
|
||||
<ItemGroup>
|
||||
<CMakeOutput Include="$(IntermediateOutputRootPath)corehost\cli\exe\dotnet\$(ConfigurationGroup)\dotnet.exe" />
|
||||
<CMakeOutput Include="$(IntermediateOutputRootPath)corehost\cli\exe\dotnet\$(ConfigurationGroup)\dotnet.pdb" />
|
||||
<CMakeOutput Include="$(IntermediateOutputRootPath)corehost\cli\exe\apphost\$(ConfigurationGroup)\apphost.exe" />
|
||||
<CMakeOutput Include="$(IntermediateOutputRootPath)corehost\cli\exe\apphost\$(ConfigurationGroup)\apphost.pdb" />
|
||||
<CMakeOutput Include="$(IntermediateOutputRootPath)corehost\cli\dll\$(ConfigurationGroup)\$(HostPolicyBaseName)" />
|
||||
<CMakeOutput Include="$(IntermediateOutputRootPath)corehost\cli\dll\$(ConfigurationGroup)\hostpolicy.pdb" />
|
||||
<CMakeOutput Include="$(IntermediateOutputRootPath)corehost\cli\fxr\$(ConfigurationGroup)\$(DotnetHostFxrBaseName)" />
|
||||
<CMakeOutput Include="$(IntermediateOutputRootPath)corehost\cli\fxr\$(ConfigurationGroup)\hostfxr.pdb" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(CMakeOutput)"
|
||||
DestinationFolder="$(CoreHostOutputDir)"/>
|
||||
</Target>
|
||||
</Project>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Condition="Exists('..\dir.props')" Project="..\dir.props" />
|
||||
</Project>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<!-- required to build the projects in their specified order -->
|
||||
<PropertyGroup>
|
||||
<SerializeProjects>true</SerializeProjects>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
|
||||
<RestoreDuringBuild Condition="'$(RestoreDuringBuild)'==''">true</RestoreDuringBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Project Include="$(MSBuildThisFileDirectory)corehost/build.proj" />
|
||||
<Project Include="$(MSBuildThisFileDirectory)pkg/dir.proj" />
|
||||
<Project Include="$(MSBuildThisFileDirectory)managed/dir.proj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Tasks from buildtools for easy project.json dependency updates -->
|
||||
<UsingTask TaskName="UpdatePackageDependencyVersion" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
|
||||
|
||||
<Target Name="UpdatePackageDependencyVersion">
|
||||
<UpdatePackageDependencyVersion ProjectJsons="@(ProjectJsonFiles)"
|
||||
PackageId="$(PackageId)"
|
||||
OldVersion="$(OldVersion)"
|
||||
NewVersion="$(NewVersion)" />
|
||||
</Target>
|
||||
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<CoreHostLockedDir>$(CoreHostOutputDir)locked\</CoreHostLockedDir>
|
||||
<SharedFrameworkSourceRoot>$(IntermediateOutputRootPath)sharedFramework\framework</SharedFrameworkSourceRoot>
|
||||
<IntermediateOutputForPackaging>$(IntermediateOutputRootPath)forPackaging</IntermediateOutputForPackaging>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<LibPrefix Condition="'$(OSGroup)' != 'Windows_NT'">lib</LibPrefix>
|
||||
<LibSuffix Condition="'$(OSGroup)' == 'Windows_NT'">.dll</LibSuffix>
|
||||
<LibSuffix Condition="'$(OSGroup)' == 'OSX'">.dylib</LibSuffix>
|
||||
<LibSuffix Condition="'$(OSGroup)' != 'Windows_NT' and '$(OSGroup)' != 'OSX'">.so</LibSuffix>
|
||||
<DotnetHostFxrBaseName>$(LibPrefix)hostfxr$(LibSuffix)</DotnetHostFxrBaseName>
|
||||
<HostPolicyBaseName>$(LibPrefix)hostpolicy$(LibSuffix)</HostPolicyBaseName>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Use actual publishable (non-dummy) package name produced by the build system for this RID -->
|
||||
<!-- TODO: chcosta - do we really need this? -->
|
||||
<PropertyGroup Condition="'$(TargetRid)' != ''">
|
||||
<PackageTargetRid>$(TargetRid)</PackageTargetRid>
|
||||
<PackageTargetRid Condition="'$(TargetRid)' == 'osx.10.11-x64'">osx.10.10-x64</PackageTargetRid>
|
||||
<PackageTargetRid Condition="'$(TargetRid)' == 'rhel.7.0-x64'">rhel.7-x64</PackageTargetRid>
|
||||
<PackageTargetRid Condition="'$(TargetRid)' == 'rhel.7.1-x64'">rhel.7-x64</PackageTargetRid>
|
||||
<PackageTargetRid Condition="'$(TargetRid)' == 'rhel.7.2-x64'">rhel.7-x64</PackageTargetRid>
|
||||
<PackageTargetRid Condition="'$(TargetRid)' == 'rhel.7.3-x64'">rhel.7-x64</PackageTargetRid>
|
||||
<PackageTargetRid Condition="'$(TargetRid)' == 'rhel.7.2-x64'">rhel.7-x64</PackageTargetRid>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\dir.targets" />
|
||||
</Project>
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"description": "Abstractions for making code that uses file system and environment testable.",
|
||||
"version": "2.0.0-preview2-*",
|
||||
"version": "2.0.0-*",
|
||||
"buildOptions": {
|
||||
"warningsAsErrors": true,
|
||||
"keyFile": "../../setuptools/Key.snk",
|
||||
"keyFile": "../../../tools-local/setuptools/Key.snk",
|
||||
"allowUnsafe": true
|
||||
},
|
||||
"frameworks": {
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче