Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Revert "Use dotnet msbuild to launch makefile.shade"
Browse files Browse the repository at this point in the history
This reverts commit 0e30b52.
  • Loading branch information
pranavkm committed Feb 3, 2017
1 parent 0e30b52 commit 1cc9f90
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 259 deletions.
35 changes: 6 additions & 29 deletions build/KoreBuild.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#requires -version 4

param([parameter(ValueFromRemainingArguments=$true)][string[]] $allparams)

$repoFolder = $env:REPO_FOLDER
if (!$repoFolder) {
throw "REPO_FOLDER is not set"
Expand Down Expand Up @@ -93,34 +91,13 @@ if (!(Test-Path "$koreBuildFolder\Sake"))
Invoke-WebRequest "https://dist.nuget.org/win-x86-commandline/v3.5.0-beta2/NuGet.exe" -OutFile "$koreBuildFolder/nuget.exe"
}

$env:KOREBUILD_FOLDER=$koreBuildFolder
$makeFileProj = "$koreBuildFolder/targets/makefile.proj"

$msbuildArtifactsDir = "$repoFolder/artifacts/msbuild"
$msbuildLogFilePath = "$msbuildArtifactsDir/msbuild.log"
$msBuildResponseFile = "$msbuildArtifactsDir/msbuild.rsp"

if ($allparams)
$makeFilePath = "makefile.shade"
if (!(Test-Path $makeFilePath))
{
$targets += "/t:$($allparams.Replace(' ', ';'))"
$makeFilePath = "$koreBuildFolder\shade\makefile.shade"
}

$msBuildArguments = @"
/nologo
/m
/detailedsummary
"$makeFileProj"
/p:KoreBuildDirectory="$koreBuildFolder/"
/p:RepositoryRoot="$repoFolder/"
/fl
/flp:LogFile="$msbuildLogFilePath";Verbosity=diagnostic;Encoding=UTF-8
$targets
"@

if (!(Test-Path $msbuildArtifactsDir))
{
mkdir $msbuildArtifactsDir | Out-Null
}
$msBuildArguments | Out-File -Encoding ASCII -FilePath $msBuildResponseFile
Write-Host "Using makefile: $makeFilePath"

dotnet msbuild `@"$msBuildResponseFile"
$env:KOREBUILD_FOLDER=$koreBuildFolder
&"$koreBuildFolder\Sake\0.2.2\tools\Sake.exe" -I $koreBuildFolder\shade -f $makeFilePath @args
34 changes: 6 additions & 28 deletions build/KoreBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ while [[ $# > 0 ]]; do
repoFolder=$1
;;
*)
if [ -z "$targets" ]; then
targets="/t:$1"
else
targets+=";$1"
fi
targets+=" $1"
;;
esac
shift
Expand Down Expand Up @@ -114,28 +110,10 @@ if [ ! -f $nugetPath ]; then
wget -O $nugetPath $nugetUrl 2>/dev/null || curl -o $nugetPath --location $nugetUrl 2>/dev/null
fi

export KOREBUILD_FOLDER="$koreBuildFolder"


makeFileProj="$koreBuildFolder/targets/makefile.proj"
msbuildArtifactsDir="$repoFolder/artifacts/msbuild"
msbuildResponseFile="$msbuildArtifactsDir/msbuild.rsp"
msbuildLogFile="$msbuildArtifactsDir/msbuild.log"

if [ ! -f $msbuildArtifactsDir ]; then
mkdir -p $msbuildArtifactsDir
makeFile="makefile.shade"
if [ ! -e $makeFile ]; then
makeFile="$koreBuildFolder/shade/makefile.shade"
fi

cat > $msbuildResponseFile <<ENDMSBUILDARGS
/nologo
/m
/detailedsummary
"$makeFileProj"
/p:KoreBuildDirectory="$koreBuildFolder/"
/p:RepositoryRoot="$repoFolder/"
/fl
-flp:LogFile="$msbuildLogFile";Verbosity=diagnostic;Encoding=UTF-8
$targets
ENDMSBUILDARGS

dotnet msbuild @"$msbuildResponseFile"
export KOREBUILD_FOLDER="$koreBuildFolder"
mono $sakeFolder/0.2.2/tools/Sake.exe -I $koreBuildFolder/shade -f $makeFile $targets
10 changes: 3 additions & 7 deletions build/shade/_k-standard-goals.shade
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,12 @@ default SAMPLES_PROJECT_GLOB = "samples/*/*.csproj"
var directory = new DirectoryInfo(TARGET_DIR);
directory.Attributes &= ~FileAttributes.ReadOnly;

foreach (var subDirectory in directory.GetDirectories().Where(d => d.Name != "msbuild"))
foreach (var info in directory.GetFileSystemInfos("*", SearchOption.AllDirectories))
{
subDirectory.Attributes &= ~FileAttributes.ReadOnly;
subDirectory.Delete(true);
info.Attributes &= ~FileAttributes.ReadOnly;
}

foreach (var file in directory.EnumerateFiles())
{
file.Delete();
}
directory.Delete(true);
}
}

Expand Down
6 changes: 0 additions & 6 deletions build/targets/common.props

This file was deleted.

158 changes: 0 additions & 158 deletions build/targets/legacy-lifecycle.targets

This file was deleted.

14 changes: 0 additions & 14 deletions build/targets/makefile.proj

This file was deleted.

17 changes: 0 additions & 17 deletions build/targets/standard-lifecycle.targets

This file was deleted.

0 comments on commit 1cc9f90

Please sign in to comment.