This commit is contained in:
Charles Torre 2021-02-08 15:50:05 -08:00
Родитель 9755bab1f2
Коммит ec13ea7a27
8 изменённых файлов: 76 добавлений и 1 удалений

15
Build-Guan.ps1 Normal file
Просмотреть файл

@ -0,0 +1,15 @@
$ErrorActionPreference = "Stop"
$Configuration="Release"
[string] $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
try {
Push-Location $scriptPath
Remove-Item $scriptPath\Guan\bin\release\netstandard2.0\ -Recurse -Force -EA SilentlyContinue
dotnet publish $scriptPath\Guan\Guan.csproj -o bin\release\netstandard2.0 -c $Configuration
}
finally {
Pop-Location
}

28
Build-NugetPackage.ps1 Normal file
Просмотреть файл

@ -0,0 +1,28 @@
function Build-Nuget {
param (
[string]
$packageId,
[string]
$basePath
)
[string] $nugetSpecTemplate = [System.IO.File]::ReadAllText([System.IO.Path]::Combine($scriptPath, "Guan.nuspec.template"))
[string] $nugetSpecPath = "$scriptPath\Guan\bin\release\netstandard2.0\$($packageId).nuspec"
[System.IO.File]::WriteAllText($nugetSpecPath, $nugetSpecTemplate.Replace("%PACKAGE_ID%", $packageId).Replace("%ROOT_PATH%", $scriptPath))
.\nuget.exe pack $nugetSpecPath -basepath $basePath -OutputDirectory bin\release\Guan\Nugets -properties NoWarn=NU5100
}
[string] $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
try {
Push-Location $scriptPath
Build-Nuget "Microsoft.ServiceFabricApps.Guan" "$scriptPath\Guan\bin\release\netstandard2.0"
}
finally {
Pop-Location
}

27
Guan.nuspec.template Normal file
Просмотреть файл

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="3.3.0">
<id>%PACKAGE_ID%</id>
<version>1.0.0</version>
<authors>Microsoft</authors>
<license type="expression">MIT</license>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<title>Guan Logic Progamming Library</title>
<icon>icon.png</icon>
<language>en-US</language>
<description>Guan is a general-purpose logic programming system with a C# API for external predicate implementation. It is a close approximation of Prolog, with extended capabilities and some differences.</description>
<contentFiles>
<files include="**" buildAction="None" copyToOutput="true" />
</contentFiles>
<dependencies>
<group targetFramework=".NETStandard2.0" />
</dependencies>
<projectUrl>https://github.com/microsoft/guan</projectUrl>
<tags>guan logic-programming netstandard20 csharp</tags>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
</metadata>
<files>
<file src="Guan.dll" target="lib\netstandard2.0" />
<file src="%ROOT_PATH%\icon.png" target="" />
</files>
</package>

Просмотреть файл

@ -7,7 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Guan", "Guan\Guan.csproj",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E9747193-8B25-42DF-992E-4FCF2E07A1D4}"
ProjectSection(SolutionItems) = preProject
Build-Guan.ps1 = Build-Guan.ps1
Build-NugetPackage.ps1 = Build-NugetPackage.ps1
CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md
Guan.nuspec.template = Guan.nuspec.template
icon.png = icon.png
README.md = README.md
SECURITY.md = SECURITY.md
EndProjectSection

Просмотреть файл

@ -10,5 +10,6 @@
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Configuration.Abstractions" Version="2.0.2.45" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.1" />
</ItemGroup>
</Project>

Просмотреть файл

@ -12,7 +12,7 @@ namespace Guan.Logic
/// Class maintaining predicate types from multiple modules to provide
/// a lookup facility.
/// </summary>
internal class ModuleProvider : IFunctorProvider
public class ModuleProvider : IFunctorProvider
{
/// <summary>
/// Predicate types with the same name but different modules.

Двоичные данные
icon.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 17 KiB

Двоичные данные
nuget.exe Normal file

Двоичный файл не отображается.