diff --git a/Directory.Build.props b/Directory.Build.props index 7d0c0c60b48..93391b5b776 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,8 +8,8 @@ true net9.0 $(DotNetBuildSourceOnly) - - false + + false - + $(NetCurrent) diff --git a/build.sh b/build.sh index ed7dcb1de39..a8c0c9d6a29 100755 --- a/build.sh +++ b/build.sh @@ -13,4 +13,4 @@ while [[ -h $source ]]; do done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" -time "$scriptroot/eng/build.sh" --build --restore $@ +time "$scriptroot/eng/build.sh" --build --restore "$@" diff --git a/eng/Build.ps1 b/eng/Build.ps1 index 81ed2d6f698..33028b8c788 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -69,6 +69,7 @@ param ( [string]$officialSkipTests = "false", [switch]$noVisualStudio, [switch][Alias('pb')]$productBuild, + [switch]$fromVMR, [switch]$skipBuild, [switch]$compressAllMetadata, [switch]$buildnorealsig = $true, @@ -134,6 +135,7 @@ function Print-Usage() { Write-Host " -dontUseGlobalNuGetCache Do not use the global NuGet cache" Write-Host " -noVisualStudio Only build fsc and fsi as .NET Core applications. No Visual Studio required. '-configuration', '-verbosity', '-norestore', '-rebuild' are supported." Write-Host " -productBuild Build the repository in product-build mode." + Write-Host " -fromVMR Set when building from within the VMR." Write-Host " -skipbuild Skip building product" Write-Host " -compressAllMetadata Build product with compressed metadata" Write-Host " -buildnorealsig Build product with realsig- (default use realsig+, where necessary)" @@ -304,6 +306,7 @@ function BuildSolution([string] $solutionName, $packSolution) { /p:Build=$build ` /p:DotNetBuildRepo=$productBuild ` /p:DotNetBuild=$productBuild ` + /p:DotNetBuildFromVMR=$fromVMR ` /p:Rebuild=$rebuild ` /p:Pack=$pack ` /p:Sign=$sign ` diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props index 78286b23bab..b78d9712948 100644 --- a/eng/DotNetBuild.props +++ b/eng/DotNetBuild.props @@ -28,7 +28,7 @@ -bl enables the binlogs for the tools and Proto builds, which make debugging failures here easier --> diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index df0bcdfd89f..f68624a4cd6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,6 +1,6 @@ - + https://github.com/dotnet/source-build-reference-packages diff --git a/eng/build.sh b/eng/build.sh index 62a6a5193ac..f919619ff88 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -37,6 +37,7 @@ usage() echo " --prepareMachine Prepare machine for CI run, clean up processes after build" echo " --sourceBuild Build the repository in source-only mode." echo " --productBuild Build the repository in product-build mode." + echo " --fromVMR Set when building from within the VMR" echo " --buildnorealsig Build product with realsig- (default use realsig+ where necessary)" echo " --tfm Override the default target framework" echo "" @@ -75,8 +76,9 @@ skip_build=false prepare_machine=false source_build=false product_build=false +from_vmr=false buildnorealsig=true -properties="" +properties=() docker=false args="" @@ -170,6 +172,9 @@ while [[ $# > 0 ]]; do --productbuild|--product-build|-pb) product_build=true ;; + --fromvmr|--from-vmr) + from_vmr=true + ;; --buildnorealsig) buildnorealsig=true ;; @@ -178,7 +183,7 @@ while [[ $# > 0 ]]; do shift ;; /p:*) - properties="$properties $1" + properties+=("$1") ;; *) echo "Invalid argument: $1" @@ -290,9 +295,9 @@ function BuildSolution { BuildMessage="Error building tools" # TODO: Remove DotNetBuildRepo property when fsharp is on Arcade 10 - local args=" publish $repo_root/proto.proj $blrestore $bltools /p:Configuration=Proto /p:DotNetBuildRepo=$product_build /p:DotNetBuild=$product_build /p:DotNetBuildSourceOnly=$source_build $properties" + local args=("publish" "$repo_root/proto.proj" "$blrestore" "$bltools" "/p:Configuration=Proto" "/p:DotNetBuildRepo=$product_build" "/p:DotNetBuild=$product_build" "/p:DotNetBuildSourceOnly=$source_build" "/p:DotNetBuildFromVMR=$from_vmr" ${properties[@]+"${properties[@]}"}) echo $args - "$DOTNET_INSTALL_DIR/dotnet" $args #$args || exit $? + "$DOTNET_INSTALL_DIR/dotnet" "${args[@]}" #$args || exit $? fi if [[ "$skip_build" != true ]]; then @@ -319,7 +324,8 @@ function BuildSolution { /p:DotNetBuildRepo=$product_build \ /p:DotNetBuild=$product_build \ /p:DotNetBuildSourceOnly=$source_build \ - $properties + /p:DotNetBuildFromVMR=$from_vmr \ + ${properties[@]+"${properties[@]}"} fi } diff --git a/proto.proj b/proto.proj index 69497f54883..d3355d8ae96 100644 --- a/proto.proj +++ b/proto.proj @@ -8,7 +8,7 @@ The project does not import Arcade targets so we only have the properties that were passed in, rather than calculated properties like DotNetBuildPhase. --> - +