hard-coded lib directory now that arch is stored in nuspec

This commit is contained in:
Caelan Sayler
2022-12-11 15:27:33 +00:00
parent 0b45e4deb0
commit b8d116bb2e
3 changed files with 8 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ namespace Squirrel.CommandLine
{
public static string CreateNuspec(
string packId, string packTitle, string packAuthors,
string packVersion, string releaseNotes, bool includePdb, string libFolderName)
string packVersion, string releaseNotes, bool includePdb)
{
var releaseNotesText = String.IsNullOrEmpty(releaseNotes)
? "" // no releaseNotes
@@ -32,7 +32,7 @@ namespace Squirrel.CommandLine
{releaseNotesText}
</metadata>
<files>
<file src=""**"" target=""lib\{libFolderName}\"" exclude=""{(includePdb ? "" : "*.pdb;")}*.nupkg;*.vshost.*;**\createdump.exe""/>
<file src=""**"" target=""lib\squirrel\"" exclude=""{(includePdb ? "" : "*.pdb;")}*.nupkg;*.vshost.*;**\createdump.exe""/>
</files>
</package>
".Trim();
@@ -54,17 +54,17 @@ namespace Squirrel.CommandLine
return nupkgPath;
}
public static string CreatePackageFromOptions(string tempDir, INugetPackCommand command, string libFolderName)
public static string CreatePackageFromOptions(string tempDir, INugetPackCommand command)
{
return CreatePackageFromMetadata(tempDir, command.PackDirectory, command.PackId, command.PackTitle,
command.PackAuthors, command.PackVersion, command.ReleaseNotes, command.IncludePdb, libFolderName);
command.PackAuthors, command.PackVersion, command.ReleaseNotes, command.IncludePdb);
}
public static string CreatePackageFromMetadata(
string tempDir, string packDir, string packId, string packTitle, string packAuthors,
string packVersion, string releaseNotes, bool includePdb, string libFolderName)
string packVersion, string releaseNotes, bool includePdb)
{
string nuspec = CreateNuspec(packId, packTitle, packAuthors, packVersion, releaseNotes, includePdb, libFolderName);
string nuspec = CreateNuspec(packId, packTitle, packAuthors, packVersion, releaseNotes, includePdb);
var nuspecPath = Path.Combine(tempDir, packId + ".nuspec");
File.WriteAllText(nuspecPath, nuspec);
return CreatePackageFromNuspecPath(tempDir, packDir, nuspecPath);

View File

@@ -105,7 +105,7 @@ namespace Squirrel.CommandLine.OSX
Log.Info("Adding Squirrel resources to bundle.");
var nuspecText = NugetConsole.CreateNuspec(
packId, packTitle, packAuthors, packVersion, options.ReleaseNotes, options.IncludePdb, "osx");
packId, packTitle, packAuthors, packVersion, options.ReleaseNotes, options.IncludePdb);
var nuspecPath = Path.Combine(contentsDir, Utility.SpecVersionFileName);
// nuspec and UpdateMac need to be in contents dir or this package can't update

View File

@@ -22,7 +22,7 @@ namespace Squirrel.CommandLine.Windows
public static void Pack(PackWindowsCommand options)
{
using (Utility.GetTempDirectory(out var tmp)) {
var nupkgPath = NugetConsole.CreatePackageFromOptions(tmp, options, "win");
var nupkgPath = NugetConsole.CreatePackageFromOptions(tmp, options);
options.Package = nupkgPath;
Releasify(options);
}