create quick packager
This commit is contained in:
parent
80be645609
commit
8d359fb4ce
@ -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
|
||||
|
||||
5
build-btcpayplugin.ps1
Normal file
5
build-btcpayplugin.ps1
Normal file
@ -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"
|
||||
@ -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,
|
||||
|
||||
28
tools/Smartstore.PackagerCLI/Program.cs
Normal file
28
tools/Smartstore.PackagerCLI/Program.cs
Normal file
@ -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}");
|
||||
20
tools/Smartstore.PackagerCLI/Smartstore.PackagerCLI.csproj
Normal file
20
tools/Smartstore.PackagerCLI/Smartstore.PackagerCLI.csproj
Normal file
@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Smartstore.Core\Smartstore.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\..\build-btcpayplugin.ps1">
|
||||
<Link>build-btcpayplugin.ps1</Link>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Loading…
Reference in New Issue
Block a user