Update NuGet after certificates are updated, not before.
parent
5ddfee82af
commit
8d906642d9
|
@ -202,7 +202,7 @@ namespace CitizenMP.Server.Installer
|
||||||
{
|
{
|
||||||
{"Configuration", "Release"},
|
{"Configuration", "Release"},
|
||||||
{"Platform", "Any CPU"},
|
{"Platform", "Any CPU"},
|
||||||
{"DebugType", IsWin32() ? "None" : "pdbonly" },
|
{"DebugType", IsWin32() ? "None" : "pdbonly"},
|
||||||
{"DebugSymbols", false.ToString()},
|
{"DebugSymbols", false.ToString()},
|
||||||
{"OutputPath", binOutputDirectory.FullName},
|
{"OutputPath", binOutputDirectory.FullName},
|
||||||
{"AllowedReferenceRelatedFileExtensions", "\".mdb\"=\"\";\".pdb\"=\"\";\".xml\"=\"\""}
|
{"AllowedReferenceRelatedFileExtensions", "\".mdb\"=\"\";\".pdb\"=\"\";\".xml\"=\"\""}
|
||||||
|
@ -290,17 +290,6 @@ namespace CitizenMP.Server.Installer
|
||||||
// Mono compatibility
|
// Mono compatibility
|
||||||
Environment.SetEnvironmentVariable("MONO_IOMAP", "all");
|
Environment.SetEnvironmentVariable("MONO_IOMAP", "all");
|
||||||
|
|
||||||
{
|
|
||||||
// The NuGet.exe that is shipped with CitizenMP.Server has a few bugs...
|
|
||||||
var nugetExePath = Path.Combine(workspace.FullName, ".nuget", "NuGet.exe");
|
|
||||||
Console.WriteLine("Updating NuGet...");
|
|
||||||
File.Delete(nugetExePath);
|
|
||||||
using (var wc = new WebClient())
|
|
||||||
{
|
|
||||||
wc.DownloadFile("https://nuget.org/NuGet.exe", nugetExePath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure we restore nuget packages automatically and without permissions interfering with /tmp/nuget/ (edge case)
|
// Make sure we restore nuget packages automatically and without permissions interfering with /tmp/nuget/ (edge case)
|
||||||
var newTempDir = workspace.CreateSubdirectory(".tmp");
|
var newTempDir = workspace.CreateSubdirectory(".tmp");
|
||||||
Environment.SetEnvironmentVariable("EnableNuGetPackageRestore", "true");
|
Environment.SetEnvironmentVariable("EnableNuGetPackageRestore", "true");
|
||||||
|
@ -321,12 +310,11 @@ namespace CitizenMP.Server.Installer
|
||||||
ShowSummary = true,
|
ShowSummary = true,
|
||||||
SkipProjectStartedText = true
|
SkipProjectStartedText = true
|
||||||
});
|
});
|
||||||
loggers.Add(new ConsoleLogger(LoggerVerbosity.Quiet) { ShowSummary = false });
|
loggers.Add(new ConsoleLogger(LoggerVerbosity.Quiet) {ShowSummary = false});
|
||||||
|
|
||||||
// Use a different build route if running on the Mono interpreter
|
// Import/Update Mozilla certs for NuGet to not fail out on non-Windows machines
|
||||||
if (!IsWin32())
|
if (!IsWin32())
|
||||||
{
|
{
|
||||||
// Import Mozilla certs for NuGet to not fail out
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// TODO: Make sure this does not fail out by checking if mozroots is installed
|
// TODO: Make sure this does not fail out by checking if mozroots is installed
|
||||||
|
@ -341,7 +329,22 @@ namespace CitizenMP.Server.Installer
|
||||||
Console.Error.WriteLine("ERROR: {0}", error.Message);
|
Console.Error.WriteLine("ERROR: {0}", error.Message);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// The NuGet.exe that is shipped with CitizenMP.Server has a few bugs...
|
||||||
|
var nugetExePath = Path.Combine(workspace.FullName, ".nuget", "NuGet.exe");
|
||||||
|
Console.WriteLine("Updating NuGet...");
|
||||||
|
File.Delete(nugetExePath);
|
||||||
|
using (var wc = new WebClient())
|
||||||
|
{
|
||||||
|
wc.DownloadFile("https://nuget.org/NuGet.exe", nugetExePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use a different build route if running on the Mono interpreter
|
||||||
|
if (!IsWin32())
|
||||||
|
{
|
||||||
// Build doesn't work with the new API on Mono, use the deprecated api
|
// Build doesn't work with the new API on Mono, use the deprecated api
|
||||||
Console.WriteLine("Building server binaries...");
|
Console.WriteLine("Building server binaries...");
|
||||||
#pragma warning disable 618
|
#pragma warning disable 618
|
||||||
|
|
Loading…
Reference in New Issue