Remove FileHelpers Dependency (#2692)

This commit is contained in:
flightlevel
2018-03-10 19:28:59 +11:00
committed by GitHub
parent 3e5e48c3a0
commit 119784ab5c
2 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,4 @@
#tool nuget:?package=NUnit.ConsoleRunner #tool nuget:?package=NUnit.ConsoleRunner
#addin nuget:?package=Cake.FileHelpers
#addin nuget:?package=Cake.Git #addin nuget:?package=Cake.Git
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
@@ -174,7 +173,7 @@ Task("Appveyor-Push-Artifacts")
} }
}); });
Task("Potential-Release-Notes") Task("Release-Notes")
.IsDependentOn("Appveyor-Push-Artifacts") .IsDependentOn("Appveyor-Push-Artifacts")
.Does(() => .Does(() =>
{ {
@@ -213,7 +212,7 @@ Task("Potential-Release-Notes")
string buildNote = String.Join(Environment.NewLine, notesList); string buildNote = String.Join(Environment.NewLine, notesList);
Information(buildNote); Information(buildNote);
FileAppendLines(workingDir + "\\BuildOutput\\ReleaseNotes.txt", notesList.ToArray()); System.IO.File.WriteAllLines(workingDir + "\\BuildOutput\\ReleaseNotes.txt", notesList.ToArray());
} }
else else
{ {
@@ -273,7 +272,7 @@ private string RelativeWinPathToCygPath(string relativePath)
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
Task("Default") Task("Default")
.IsDependentOn("Potential-Release-Notes") .IsDependentOn("Release-Notes")
.Does(() => .Does(() =>
{ {
Information("Default Task Completed"); Information("Default Task Completed");

View File

@@ -158,14 +158,15 @@ if(-Not $SkipToolPackageRestore.IsPresent) {
if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
Write-Verbose -Message "Missing or changed package.config hash..." 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..." Write-Verbose -Message "Restoring tools from NuGet..."
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
Throw "An error occured while restoring NuGet tools." Throw "An error occurred while restoring NuGet tools."
} }
else else
{ {
@@ -185,7 +186,7 @@ if (Test-Path $ADDINS_PACKAGES_CONFIG) {
$NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`"" $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`""
if ($LASTEXITCODE -ne 0) { 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) 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`"" $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`""
if ($LASTEXITCODE -ne 0) { 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) Write-Verbose -Message ($NuGetOutput | out-string)