Skip to content

Commit 0300b5c

Browse files
committed
Change output fspack file name to the plugin type and version
#15
1 parent 239428c commit 0300b5c

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/Packager.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public Packager(PackOptions options)
1515

1616
public bool Build()
1717
{
18-
if (!ValidateProjectPath(out var projectName))
18+
if (!ValidateProjectPath())
1919
return false;
2020

2121
var configuration = "Release";
@@ -53,8 +53,9 @@ public bool Build()
5353
File.WriteAllText(checksumPath, checksum);
5454
LogInfo($"SHA256: {checksum}");
5555

56-
var finalPackagePath = ResolveOutputPath(projectName);
57-
CreateFinalPackage(finalPackagePath, pluginPath, manifestPath, checksumPath, projectName);
56+
var finalPackName = $"{metadata.Type}.{metadata.Version}";
57+
var finalPackagePath = ResolveOutputPath(finalPackName);
58+
CreateFinalPackage(finalPackagePath, pluginPath, manifestPath, checksumPath, finalPackName);
5859

5960
LogInfo($"Final package created: {finalPackagePath}");
6061
return true;
@@ -65,10 +66,8 @@ public bool Build()
6566
}
6667
}
6768

68-
private bool ValidateProjectPath(out string projectName)
69+
private bool ValidateProjectPath()
6970
{
70-
projectName = Path.GetFileNameWithoutExtension(_options.ProjectPath);
71-
7271
if (!File.Exists(_options.ProjectPath) || Path.GetExtension(_options.ProjectPath) != ".csproj")
7372
{
7473
LogError("Provided file must be a valid .csproj file.");

0 commit comments

Comments
 (0)