diff --git a/build.cake b/build.cake index 728601060..3d9c8463e 100644 --- a/build.cake +++ b/build.cake @@ -1,5 +1,4 @@ #tool nuget:?package=NUnit.ConsoleRunner -#addin nuget:?package=Cake.FileHelpers #addin nuget:?package=Cake.Git ////////////////////////////////////////////////////////////////////// @@ -174,7 +173,7 @@ Task("Appveyor-Push-Artifacts") } }); -Task("Potential-Release-Notes") +Task("Release-Notes") .IsDependentOn("Appveyor-Push-Artifacts") .Does(() => { @@ -213,7 +212,7 @@ Task("Potential-Release-Notes") string buildNote = String.Join(Environment.NewLine, notesList); Information(buildNote); - FileAppendLines(workingDir + "\\BuildOutput\\ReleaseNotes.txt", notesList.ToArray()); + System.IO.File.WriteAllLines(workingDir + "\\BuildOutput\\ReleaseNotes.txt", notesList.ToArray()); } else { @@ -273,7 +272,7 @@ private string RelativeWinPathToCygPath(string relativePath) ////////////////////////////////////////////////////////////////////// Task("Default") - .IsDependentOn("Potential-Release-Notes") + .IsDependentOn("Release-Notes") .Does(() => { Information("Default Task Completed"); diff --git a/build.ps1 b/build.ps1 index 265bd1238..82529cf60 100644 --- a/build.ps1 +++ b/build.ps1 @@ -158,14 +158,15 @@ if(-Not $SkipToolPackageRestore.IsPresent) { if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { Write-Verbose -Message "Missing or changed package.config hash..." - Remove-Item * -Recurse -Exclude packages.config,nuget.exe + Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery | + Remove-Item -Recurse } Write-Verbose -Message "Restoring tools from NuGet..." $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet tools." + Throw "An error occurred while restoring NuGet tools." } else { @@ -185,7 +186,7 @@ if (Test-Path $ADDINS_PACKAGES_CONFIG) { $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`"" if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet addins." + Throw "An error occurred while restoring NuGet addins." } Write-Verbose -Message ($NuGetOutput | out-string) @@ -202,7 +203,7 @@ if (Test-Path $MODULES_PACKAGES_CONFIG) { $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`"" if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet modules." + Throw "An error occurred while restoring NuGet modules." } Write-Verbose -Message ($NuGetOutput | out-string)