This commit is contained in:
Nate McMaster 2017-03-01 17:19:51 -08:00
parent 6dfbab0b6c
commit 1cf3be07d0
4 changed files with 8 additions and 38 deletions

View File

@ -1 +0,0 @@
feature/msbuild

View File

@ -32,8 +32,7 @@ cd $PSScriptRoot
$repoFolder = $PSScriptRoot
$env:REPO_FOLDER = $repoFolder
$korebuildVersion = $(Get-Content -Raw $PSScriptRoot/ToolsVersion.txt).Trim()
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/$korebuildVersion.zip"
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
if ($env:KOREBUILD_ZIP)
{
$koreBuildZip=$env:KOREBUILD_ZIP
@ -64,4 +63,4 @@ if (!(Test-Path $buildFolder)) {
}
}
&"$buildFile" $args
&"$buildFile" $args

View File

@ -2,8 +2,7 @@
repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $repoFolder
toolsVersion=$(cat $repoFolder/ToolsVersion.txt)
koreBuildZip="https://github.com/aspnet/KoreBuild/archive/$toolsVersion.zip"
koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip"
if [ ! -z $KOREBUILD_ZIP ]; then
koreBuildZip=$KOREBUILD_ZIP
fi
@ -44,4 +43,4 @@ if test ! -d $buildFolder; then
fi
fi
$buildFile -r $repoFolder "$@"
$buildFile -r $repoFolder "$@"

View File

@ -254,8 +254,6 @@ var buildTarget = "compile"
Environment.SetEnvironmentVariable("NUGET_PUBLISH_FEED", "https://dotnet.myget.org/F/aspnetcore-volatile-dev/api/v2/package");
}
var universeToolsVersion = File.ReadAllText(Path.Combine(Directory.GetCurrentDirectory(), "ToolsVersion.txt")).Trim();
foreach (var batch in batchedRepos)
{
Parallel.ForEach(batch.ToArray(), new ParallelOptions { MaxDegreeOfParallelism = threads }, repo =>
@ -267,38 +265,13 @@ var buildTarget = "compile"
blockLogger.StartBlock(blockName);
}
// begin workaround
// as we transition to VS 2017, some repos will build with project.json and others with csproj
// the 'csproj' version of KoreBuild is the 'feature/msbuild' branch of that repo. project.json
// support is on 'dev'. This workaround avoids installing the version of KoreBuild used by
// individual repos unless it is already upgraded to the version currently used by Universe.
var repoToolsVersion = universeToolsVersion;
var buildPs1 = Path.Combine(repo, "build.ps1");
if (File.Exists(buildPs1))
if (!IsLinux)
{
foreach (var line in File.ReadAllLines(buildPs1))
{
var match = Regex.Match(line, @".*https://github.com/aspnet/KoreBuild/archive/(.+)\.zip.*");
if (match != null && match.Success)
{
repoToolsVersion = match.Groups[1].Value;
break;
}
}
Exec("cmd", "/C xcopy /S/Q/I/Y .build " + Path.Combine(repo, ".build"), "");
}
Log.Info(repo + " KoreBuild version = " + repoToolsVersion + ", Universe = " + universeToolsVersion);
// end workaround
if (repoToolsVersion == universeToolsVersion)
else
{
if (!IsLinux)
{
Exec("cmd", "/C xcopy /S/Q/I/Y .build " + Path.Combine(repo, ".build"), "");
}
else
{
CopyFolder(".build", Path.Combine(repo, ".build"), true);
}
CopyFolder(".build", Path.Combine(repo, ".build"), true);
}
try