Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/common/dotnet-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ case $cpuname in
;;
esac

dotnetRoot="${repo_root}.dotnet"
dotnetRoot="$repo_root/.dotnet"
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
dotnetRoot="$dotnetRoot/$architecture"
fi
Expand Down
6 changes: 3 additions & 3 deletions eng/common/internal-feed-operations.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ function SetupCredProvider {
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
# feeds successfully

$nugetConfigPath = Join-Path $RepoRoot "NuGet.config"
$nugetConfigPath = "$RepoRoot\NuGet.config"

if (-Not (Test-Path -Path $nugetConfigPath)) {
Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!'
ExitWithExitCode 1
ExitWithExitCode 1
}

$endpoints = New-Object System.Collections.ArrayList
Expand Down Expand Up @@ -85,7 +85,7 @@ function SetupCredProvider {

#Workaround for https://github.com/microsoft/msbuild/issues/4430
function InstallDotNetSdkAndRestoreArcade {
$dotnetTempDir = Join-Path $RepoRoot "dotnet"
$dotnetTempDir = "$RepoRoot\dotnet"
$dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*)
$dotnet = "$dotnetTempDir\dotnet.exe"
$restoreProjPath = "$PSScriptRoot\restore.proj"
Expand Down
2 changes: 1 addition & 1 deletion eng/common/internal-feed-operations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function SetupCredProvider {
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
# feeds successfully

local nugetConfigPath="{$repo_root}NuGet.config"
local nugetConfigPath="$repo_root/NuGet.config"

if [ ! "$nugetConfigPath" ]; then
Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!"
Expand Down
7 changes: 2 additions & 5 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,7 @@ function MSBuild-Core() {
}

foreach ($arg in $args) {
if ($null -ne $arg -and $arg.Trim() -ne "") {
if ($arg.EndsWith('\')) {
$arg = $arg + "\"
}
if ($arg -ne $null -and $arg.Trim() -ne "") {
$cmdArgs += " `"$arg`""
}
}
Expand Down Expand Up @@ -777,7 +774,7 @@ function Get-Darc($version) {

. $PSScriptRoot\pipeline-logging-functions.ps1

$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..\')
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
$ArtifactsDir = Join-Path $RepoRoot 'artifacts'
$ToolsetDir = Join-Path $ArtifactsDir 'toolset'
Expand Down
9 changes: 4 additions & 5 deletions eng/common/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -485,14 +485,13 @@ _script_dir=`dirname "$_ResolvePath"`

eng_root=`cd -P "$_script_dir/.." && pwd`
repo_root=`cd -P "$_script_dir/../.." && pwd`
repo_root="${repo_root}/"
artifacts_dir="${repo_root}artifacts"
artifacts_dir="$repo_root/artifacts"
toolset_dir="$artifacts_dir/toolset"
tools_dir="${repo_root}.tools"
tools_dir="$repo_root/.tools"
log_dir="$artifacts_dir/log/$configuration"
temp_dir="$artifacts_dir/tmp/$configuration"

global_json_file="${repo_root}global.json"
global_json_file="$repo_root/global.json"
# determine if global.json contains a "runtimes" entry
global_json_has_runtimes=false
if command -v jq &> /dev/null; then
Expand All @@ -505,7 +504,7 @@ fi

# HOME may not be defined in some scenarios, but it is required by NuGet
if [[ -z $HOME ]]; then
export HOME="${repo_root}artifacts/.home/"
export HOME="$repo_root/artifacts/.home/"
mkdir -p "$HOME"
fi

Expand Down
9 changes: 6 additions & 3 deletions src/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project DefaultTargets="Execute">
<Project DefaultTargets="Execute" TreatAsLocalProperty="RepoRoot">
<!--

Required parameters:
Expand Down Expand Up @@ -33,6 +33,9 @@
-->

<PropertyGroup>
<_RepoRootOriginal>$(RepoRoot)</_RepoRootOriginal>
<RepoRoot>$([System.IO.Path]::GetFullPath('$(RepoRoot)/'))</RepoRoot>

<_OriginalProjectsValue>$(Projects)</_OriginalProjectsValue>
</PropertyGroup>

Expand Down Expand Up @@ -77,8 +80,8 @@

<Target Name="Execute">
<Error Text="No projects were found to build. Either the 'Projects' property or 'ProjectToBuild' item group must be specified." Condition="'@(ProjectToBuild)' == ''"/>
<Error Text="Property 'RepoRoot' must be specified" Condition="'$(RepoRoot)' == ''"/>
<Error Text="File 'global.json' must exist in directory specified by RepoRoot: '$(RepoRoot)'" Condition="'$(RepoRoot)' != '' and !Exists('$(RepoRoot)global.json')"/>
<Error Text="Property 'RepoRoot' must be specified" Condition="'$(_RepoRootOriginal)' == ''"/>
<Error Text="File 'global.json' must exist in directory specified by RepoRoot: '$(_RepoRootOriginal)'" Condition="'$(_RepoRootOriginal)' != '' and !Exists('$(RepoRoot)global.json')"/>

<PropertyGroup>
<!-- 'IsRunningFromVisualStudio' may be true even when running msbuild.exe from command line. This generally means that MSBuild is from a Visual Studio installation and therefore we need to find NuGet.targets in a different location. -->
Expand Down