diff --git a/Smartstore.sln b/Smartstore.sln index 18c81e800..cb4de0dca 100644 --- a/Smartstore.sln +++ b/Smartstore.sln @@ -85,6 +85,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Smartstore.Data.Sqlite", "s EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Smartstore.BTCPayServer", "src\Smartstore.Modules\Smartstore.BTCPayServer\Smartstore.BTCPayServer.csproj", "{5580D90E-3E5F-4D4A-8DFC-DE7969FBB9C3}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Smartstore.Packager", "tools\Smartstore.Packager\Smartstore.Packager.csproj", "{B59EAEF6-5E27-42C9-9BF3-0201BE82147B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Smartstore.PackagerCLI", "tools\Smartstore.PackagerCLI\Smartstore.PackagerCLI.csproj", "{8AB115E0-CB09-4A2B-B3D5-3BB42A321957}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -278,6 +282,18 @@ Global {5580D90E-3E5F-4D4A-8DFC-DE7969FBB9C3}.DebugNoRazorCompile|Any CPU.Build.0 = DebugNoRazorCompile|Any CPU {5580D90E-3E5F-4D4A-8DFC-DE7969FBB9C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {5580D90E-3E5F-4D4A-8DFC-DE7969FBB9C3}.Release|Any CPU.Build.0 = Release|Any CPU + {B59EAEF6-5E27-42C9-9BF3-0201BE82147B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B59EAEF6-5E27-42C9-9BF3-0201BE82147B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B59EAEF6-5E27-42C9-9BF3-0201BE82147B}.DebugNoRazorCompile|Any CPU.ActiveCfg = Debug|Any CPU + {B59EAEF6-5E27-42C9-9BF3-0201BE82147B}.DebugNoRazorCompile|Any CPU.Build.0 = Debug|Any CPU + {B59EAEF6-5E27-42C9-9BF3-0201BE82147B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B59EAEF6-5E27-42C9-9BF3-0201BE82147B}.Release|Any CPU.Build.0 = Release|Any CPU + {8AB115E0-CB09-4A2B-B3D5-3BB42A321957}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AB115E0-CB09-4A2B-B3D5-3BB42A321957}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AB115E0-CB09-4A2B-B3D5-3BB42A321957}.DebugNoRazorCompile|Any CPU.ActiveCfg = Debug|Any CPU + {8AB115E0-CB09-4A2B-B3D5-3BB42A321957}.DebugNoRazorCompile|Any CPU.Build.0 = Debug|Any CPU + {8AB115E0-CB09-4A2B-B3D5-3BB42A321957}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AB115E0-CB09-4A2B-B3D5-3BB42A321957}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build-btcpayplugin.ps1 b/build-btcpayplugin.ps1 new file mode 100644 index 000000000..fd0852b2e --- /dev/null +++ b/build-btcpayplugin.ps1 @@ -0,0 +1,5 @@ +$StartPath = Split-Path -Parent $PSCommandPath +echo "$StartPath" +dotnet build $StartPath/src/Smartstore.Modules/Smartstore.BTCPayServer/Smartstore.BTCPayServer.csproj -c Release +echo "$StartPath/tools/Smartstore.PackagerCLI/Smartstore.PackagerCLI.csproj" +dotnet run --project $StartPath/tools/Smartstore.PackagerCLI/Smartstore.PackagerCLI.csproj "$StartPath/src/Smartstore.Web/Modules/Smartstore.BTCPayServer" "$StartPath/build/packages" \ No newline at end of file diff --git a/src/Smartstore.Modules/Smartstore.BTCPayServer/module.json b/src/Smartstore.Modules/Smartstore.BTCPayServer/module.json index 111425ee0..6f9701804 100644 --- a/src/Smartstore.Modules/Smartstore.BTCPayServer/module.json +++ b/src/Smartstore.Modules/Smartstore.BTCPayServer/module.json @@ -4,7 +4,7 @@ "SystemName": "Smartstore.BTCPayServer", "FriendlyName": "Bitcoin payments with BTCPay Server", "Description": "This plugin enables Bitcoin payments with your BTCPay Server instance", - "Version": "5.0.6", + "Version": "5.0.6.1", "MinAppVersion": "5.0.5", "Author": "Nisaba Solutions", "Order": 1, diff --git a/tools/Smartstore.PackagerCLI/Program.cs b/tools/Smartstore.PackagerCLI/Program.cs new file mode 100644 index 000000000..db7bc806b --- /dev/null +++ b/tools/Smartstore.PackagerCLI/Program.cs @@ -0,0 +1,28 @@ +using Smartstore.Engine.Modularity; +using Smartstore.IO; + +var modulePath = args[0]; +var buildPath = args[1]; +var dirInfo = new DirectoryInfo(modulePath); + +var lfs = new LocalFileSystem(dirInfo.ToString()); +var descriptor = ModuleDescriptor.Create(new LocalDirectory("/", dirInfo,lfs), new LocalFileSystem(dirInfo.Parent.ToString())); + +var pb = new Smartstore.Core.Packaging.PackageBuilder(new LocalFileSystem(dirInfo.Parent.Parent.ToString())); +var package = await pb.BuildPackageAsync(descriptor); +var fileName = package.FileName; + +if (!Directory.Exists(buildPath)) +{ + Directory.CreateDirectory(buildPath); +} + +fileName = Path.Combine(buildPath, fileName); + +await using (var stream = File.Create(fileName)) +{ + await package.ArchiveStream.CopyToAsync(stream); +} + +var fileInfo = new FileInfo(fileName); +Console.Write($"{fileInfo.FullName}"); \ No newline at end of file diff --git a/tools/Smartstore.PackagerCLI/Smartstore.PackagerCLI.csproj b/tools/Smartstore.PackagerCLI/Smartstore.PackagerCLI.csproj new file mode 100644 index 000000000..fcbc97be4 --- /dev/null +++ b/tools/Smartstore.PackagerCLI/Smartstore.PackagerCLI.csproj @@ -0,0 +1,20 @@ + + + + Exe + net7.0 + enable + enable + + + + + + + + + build-btcpayplugin.ps1 + + + +