Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
bug fix - nuget returns identifier that does not align with lib/fx path
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Dec 13, 2021
1 parent 9865845 commit 4f31bf8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Squirrel/ReleasePackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface IReleasePackage
string ReleasePackageFile { get; }
string SuggestedReleaseFileName { get; }

string CreateReleasePackage(string outputFile, Func<string, string> releaseNotesProcessor = null, Action<string, string> contentsPostProcessHook = null);
string CreateReleasePackage(string outputFile, Func<string, string> releaseNotesProcessor = null, Action<string> contentsPostProcessHook = null);
}

public class ReleasePackage : IEnableLogger, IReleasePackage
Expand All @@ -50,7 +50,7 @@ public string SuggestedReleaseFileName {

public SemanticVersion Version { get { return InputPackageFile.ToSemanticVersion(); } }

public string CreateReleasePackage(string outputFile, Func<string, string> releaseNotesProcessor = null, Action<string, string> contentsPostProcessHook = null)
public string CreateReleasePackage(string outputFile, Func<string, string> releaseNotesProcessor = null, Action<string> contentsPostProcessHook = null)
{
Contract.Requires(!String.IsNullOrEmpty(outputFile));
releaseNotesProcessor = releaseNotesProcessor ?? (x => (new Markdown()).Transform(x));
Expand Down Expand Up @@ -94,7 +94,7 @@ public string CreateReleasePackage(string outputFile, Func<string, string> relea
"The input package file {0} must have no dependencies.", InputPackageFile));
}

var targetFramework = frameworks.Single();
//var targetFramework = frameworks.Single();

this.Log().Info("Creating release package: {0} => {1}", InputPackageFile, outputFile);

Expand All @@ -116,7 +116,7 @@ public string CreateReleasePackage(string outputFile, Func<string, string> relea

addDeltaFilesToContentTypes(tempDir.FullName);

contentsPostProcessHook?.Invoke(tempPath, targetFramework.Identifier);
contentsPostProcessHook?.Invoke(tempPath);

HelperExe.CreateZipFromDirectory(outputFile, tempPath).Wait();

Expand Down
5 changes: 3 additions & 2 deletions src/SquirrelCli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static void Releasify(ReleasifyOptions options)
Log.Info("Creating release package: " + file.FullName);

var rp = new ReleasePackage(file.FullName);
rp.CreateReleasePackage(Path.Combine(di.FullName, rp.SuggestedReleaseFileName), contentsPostProcessHook: (pkgPath, frameworkName) => {
rp.CreateReleasePackage(Path.Combine(di.FullName, rp.SuggestedReleaseFileName), contentsPostProcessHook: (pkgPath) => {
// create stub executable for all exe's in this package (except Squirrel!)
new DirectoryInfo(pkgPath).GetAllFilesRecursively()
Expand All @@ -191,7 +191,8 @@ static void Releasify(ReleasifyOptions options)
.Wait();
// copy Update.exe into package, so it can also be updated in both full/delta packages
File.Copy(updatePath, Path.Combine(pkgPath, "lib", frameworkName, "Squirrel.exe"), true);
var libDir = Directory.GetDirectories(Path.Combine(pkgPath, "lib")).First();
File.Copy(updatePath, Path.Combine(libDir, "Squirrel.exe"), true);
});

processed.Add(rp.ReleasePackageFile);
Expand Down

0 comments on commit 4f31bf8

Please sign in to comment.