mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 14:51:41 +01:00
commit
c814e5bc7a
@ -18,7 +18,6 @@
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<PackageTags>capnp "Cap'n Proto" RPC serialization cerealization</PackageTags>
|
||||
<Version>1.2-local$([System.DateTime]::UtcNow.ToString(yyMMddHHmm))</Version>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
@ -9,12 +9,8 @@
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
<AssemblyVersion>1.2.0.0</AssemblyVersion>
|
||||
<FileVersion>1.2.0.0</FileVersion>
|
||||
<Version>1.2-local$([System.DateTime]::UtcNow.ToString(yyMMddHHmm))</Version>
|
||||
|
||||
<NuspecFile>$(MSBuildThisFileDirectory)CapnpC.CSharp.MsBuild.Generation.nuspec</NuspecFile>
|
||||
<NuspecProperties>version=$(Version);configuration=$(Configuration)</NuspecProperties>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageOutputPath>..\bin\$(Configuration)</PackageOutputPath>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
|
@ -21,9 +21,9 @@
|
||||
<files>
|
||||
<file src="build\**\*" target="build" />
|
||||
<file src="buildMultiTargeting\**\*" target="buildMultiTargeting" />
|
||||
<file src="bin\$configuration$\net471\*.dll" target="tasks\net471" />
|
||||
<file src="bin\$configuration$\netcoreapp2.1\*.dll" target="tasks\netcoreapp2.1" />
|
||||
<file src="bin\$configuration$\netcoreapp2.1\*.deps.json" target="tasks\netcoreapp2.1" />
|
||||
<file src="bin\$config$\net471\*.dll" target="tasks\net471" />
|
||||
<file src="bin\$config$\netcoreapp2.1\*.dll" target="tasks\netcoreapp2.1" />
|
||||
<file src="bin\$config$\netcoreapp2.1\*.deps.json" target="tasks\netcoreapp2.1" />
|
||||
|
||||
<file src="..\Licenses\**\*" target="licenses" />
|
||||
<file src="..\LICENSE" target="LICENSE" />
|
||||
|
9
Directory.Build.props
Normal file
9
Directory.Build.props
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nerdbank.GitVersioning">
|
||||
<Version>3.0.28</Version>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
23
Directory.Build.targets
Normal file
23
Directory.Build.targets
Normal file
@ -0,0 +1,23 @@
|
||||
<Project>
|
||||
<Target Name="SetNuspecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
|
||||
<PropertyGroup>
|
||||
<NuspecProperties>$(NuspecProperties);config=$(Configuration)</NuspecProperties>
|
||||
<NuspecProperties>$(NuspecProperties);version=$(NuGetPackageVersion)</NuspecProperties>
|
||||
<NuspecProperties>$(NuspecProperties);SolutionDir=$(SolutionDir)</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanupNupkgs" BeforeTargets="Build" >
|
||||
<ItemGroup>
|
||||
<Nupkgs2Delete Include="$(PackageOutputAbsolutePath)\*.nupkg"/>
|
||||
</ItemGroup>
|
||||
<Delete Files="@(Nupkgs2Delete)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CopyNupkgToFolder" AfterTargets="Pack">
|
||||
<ItemGroup>
|
||||
<GeneratedNupkgs Include="$(PackageOutputAbsolutePath)\*.nupkg"/>
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(GeneratedNupkgs)" DestinationFolder="$(SolutionDir)GeneratedNuGetPackages\$(Configuration)" />
|
||||
</Target>
|
||||
</Project>
|
84
appveyor.yml
84
appveyor.yml
@ -1,27 +1,21 @@
|
||||
version: '1.2.{build}'
|
||||
image: Visual Studio 2019
|
||||
# branches:
|
||||
# only:
|
||||
# - master
|
||||
version: '{build}'
|
||||
cache:
|
||||
- c:\Tools\vcpkg\installed
|
||||
init:
|
||||
# Good practise, because Windows line endings are different from Unix/Linux ones
|
||||
- cmd: git config --global core.autocrlf true
|
||||
install:
|
||||
- cd c:\tools\vcpkg
|
||||
- vcpkg integrate install
|
||||
- vcpkg install capnproto
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
dotnet_csproj:
|
||||
patch: true
|
||||
file: '**\*.csproj;**\*.props;**\*.fsproj;**\*.xml'
|
||||
version: '{version}'
|
||||
package_version: '{version}'
|
||||
assembly_version: '{version}'
|
||||
file_version: '{version}'
|
||||
informational_version: '{version}'
|
||||
- dotnet tool install -g nbgv
|
||||
init:
|
||||
# Good practise, because Windows line endings are different from Unix/Linux ones
|
||||
- cmd: git config --global core.autocrlf true
|
||||
before_build:
|
||||
- cmd: nbgv cloud
|
||||
- cmd: dotnet --version
|
||||
- cmd: msbuild -ver
|
||||
- cmd: dotnet restore ./Capnp.Net.Runtime/Capnp.Net.Runtime.csproj --verbosity m
|
||||
@ -38,48 +32,54 @@ build_script:
|
||||
- cmd: msbuild ./Capnp.Net.sln /p:Configuration="Release"
|
||||
- cmd: msbuild ./CapnpCompatTest.sln /p:Configuration="Debug"
|
||||
- cmd: msbuild ./CapnpCompatTest.sln /p:Configuration="Release"
|
||||
- ps: scripts\capnpc-csharp-pack.ps1 $env:appveyor_build_version
|
||||
- ps: scripts\capnpc-csharp-pack.ps1
|
||||
after_build:
|
||||
# For once the build has completed
|
||||
artifacts:
|
||||
- path: bin\Release\Capnp.Net.Runtime.$(appveyor_build_version).nupkg
|
||||
- path: bin\Release\Capnp.Net.Runtime.*.nupkg
|
||||
name: Capnp.Net.Runtime
|
||||
type: NuGetPackage
|
||||
- path: bin\Release\CapnpC.CSharp.MsBuild.Generation.$(appveyor_build_version).nupkg
|
||||
- path: bin\Release\CapnpC.CSharp.MsBuild.Generation.*.nupkg
|
||||
name: CapnpC.CSharp.MsBuild.Generation
|
||||
type: NuGetPackage
|
||||
- path: chocolatey\install\capnpc-csharp-win-x86.$(appveyor_build_version).nupkg
|
||||
- path: chocolatey\install\capnpc-csharp-win-x86.*.nupkg
|
||||
name: capnpc-csharp-win-x86
|
||||
type: NuGetPackage
|
||||
- path: chocolatey\install\capnpc-csharp.$(appveyor_build_version).nupkg
|
||||
- path: chocolatey\install\capnpc-csharp.*-deprecated.nupkg
|
||||
name: capnpc-csharp-deprecated
|
||||
type: NuGetPackage
|
||||
- path: capnpc-csharp\nupkg\*.nupkg
|
||||
name: capnpc-csharp
|
||||
type: NuGetPackage
|
||||
clone_depth: 1
|
||||
test_script:
|
||||
- cmd: vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.Generator.Tests\bin\Release\netcoreapp2.1\CapnpC.CSharp.Generator.Tests.dll
|
||||
- cmd: cd %APPVEYOR_BUILD_FOLDER%\chocolatey\install
|
||||
- cmd: choco install capnpc-csharp --source=".;https://chocolatey.org/api/v2" --force -y
|
||||
- cmd: cd %APPVEYOR_BUILD_FOLDER%\install-test
|
||||
- cmd: compile-test
|
||||
- cmd: cd %APPVEYOR_BUILD_FOLDER%
|
||||
- cmd: vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.Generator.Tests\bin\Release\netcoreapp2.1\CapnpC.CSharp.Generator.Tests.dll
|
||||
- cmd: choco uninstall capnpc-csharp -y
|
||||
- cmd: cd %APPVEYOR_BUILD_FOLDER%\install-test
|
||||
- cmd: notinstalled-test
|
||||
- cmd: cd %APPVEYOR_BUILD_FOLDER%\chocolatey\install
|
||||
- cmd: choco install capnpc-csharp-win-x86 --source=".;https://chocolatey.org/api/v2" --force -y
|
||||
- cmd: cd %APPVEYOR_BUILD_FOLDER%\install-test
|
||||
- cmd: compile-test
|
||||
- cmd: choco uninstall capnpc-csharp-win-x86 -y
|
||||
- cmd: notinstalled-test
|
||||
- cmd: cd %APPVEYOR_BUILD_FOLDER%
|
||||
- cmd: vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.MsBuild.Generation.Tests\bin\Release\netcoreapp2.1\CapnpC.CSharp.MsBuild.Generation.Tests.dll
|
||||
- cmd: msbuild -t:restore ./MsBuildGenerationTest/MsBuildGenerationTest.csproj /p:Configuration="Debug" /p:PackageReferenceVersion="%APPVEYOR_BUILD_VERSION%"
|
||||
- cmd: msbuild ./MsBuildGenerationTest/MsBuildGenerationTest.sln /p:Configuration="Debug" /p:PackageReferenceVersion="%APPVEYOR_BUILD_VERSION%"
|
||||
- cmd: vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests\bin\Debug\net471\Capnp.Net.Runtime.Tests.Std20.dll
|
||||
- cmd: vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests\bin\Release\net471\Capnp.Net.Runtime.Tests.Std20.dll
|
||||
- cmd: vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests.Core21\bin\Debug\netcoreapp2.1\Capnp.Net.Runtime.Tests.Core21.dll
|
||||
- cmd: vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests.Core21\bin\Release\netcoreapp2.1\Capnp.Net.Runtime.Tests.Core21.dll
|
||||
- cmd: |
|
||||
nbgv get-version -v NuGetPackageVersion >> version.txt
|
||||
set /P VERSION=< version.txt
|
||||
vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.Generator.Tests\bin\Release\netcoreapp2.1\CapnpC.CSharp.Generator.Tests.dll
|
||||
choco install capnproto --source="https://chocolatey.org/api/v2" --force -y
|
||||
cd %APPVEYOR_BUILD_FOLDER%\capnpc-csharp
|
||||
dotnet tool install --global --add-source ./nupkg capnpc-csharp --version %VERSION%
|
||||
cd %APPVEYOR_BUILD_FOLDER%\install-test
|
||||
compile-test
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.Generator.Tests\bin\Release\netcoreapp2.1\CapnpC.CSharp.Generator.Tests.dll
|
||||
dotnet tool uninstall --global capnpc-csharp
|
||||
cd %APPVEYOR_BUILD_FOLDER%\install-test
|
||||
notinstalled-test
|
||||
cd %APPVEYOR_BUILD_FOLDER%\chocolatey\install
|
||||
choco install capnpc-csharp-win-x86 --source=".;https://chocolatey.org/api/v2" --force -y --version %VERSION% --pre
|
||||
cd %APPVEYOR_BUILD_FOLDER%\install-test
|
||||
compile-test
|
||||
choco uninstall capnpc-csharp-win-x86 -y
|
||||
notinstalled-test
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.MsBuild.Generation.Tests\bin\Release\netcoreapp2.1\CapnpC.CSharp.MsBuild.Generation.Tests.dll
|
||||
msbuild -t:restore ./MsBuildGenerationTest/MsBuildGenerationTest.csproj /p:Configuration="Debug" /p:PackageReferenceVersion="%VERSION%"
|
||||
msbuild ./MsBuildGenerationTest/MsBuildGenerationTest.sln /p:Configuration="Debug" /p:PackageReferenceVersion="%VERSION%"
|
||||
vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests\bin\Debug\net471\Capnp.Net.Runtime.Tests.Std20.dll
|
||||
vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests\bin\Release\net471\Capnp.Net.Runtime.Tests.Std20.dll
|
||||
vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests.Core21\bin\Debug\netcoreapp2.1\Capnp.Net.Runtime.Tests.Core21.dll
|
||||
vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests.Core21\bin\Release\netcoreapp2.1\Capnp.Net.Runtime.Tests.Core21.dll
|
||||
on_finish :
|
||||
# any cleanup in here
|
||||
deploy:
|
||||
|
@ -5,7 +5,10 @@
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<RootNamespace>CapnpC</RootNamespace>
|
||||
<LangVersion>7.1</LangVersion>
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
<ToolCommandName>capnpc-csharp</ToolCommandName>
|
||||
<PackageOutputPath>./nupkg</PackageOutputPath>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<Authors>Christian Köllner and contributors</Authors>
|
||||
<Description>Cap'n Proto C# code generator backend</Description>
|
||||
@ -13,7 +16,6 @@
|
||||
<PackageProjectUrl>https://github.com/c80k/capnproto-dotnetcore</PackageProjectUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<PackageTags>capnp capnpc RPC serialization cerealization</PackageTags>
|
||||
<Version>1.2.0</Version>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -10,8 +10,11 @@
|
||||
<!--<license type="expression">MIT</license>-->
|
||||
<licenseUrl>https://github.com/c80k/capnproto-dotnetcore/blob/master/LICENSE</licenseUrl>
|
||||
<projectUrl>https://github.com/c80k/capnproto-dotnetcore</projectUrl>
|
||||
<title>capnpc-csharp (Install)</title>
|
||||
<description>Cap'n Proto C# code generator backend, portable .NET Core 2.1</description>
|
||||
<title>[Deprecated] capnpc-csharp (Install)</title>
|
||||
<description>Cap'n Proto C# code generator backend, portable .NET Core 2.1
|
||||
This package is deprecated now. It was converted to a .NET Core CLI tool which is now hosted here: https://www.nuget.org/packages/capnpc-csharp
|
||||
To install, type: dotnet tool install -g capnpc-csharp
|
||||
</description>
|
||||
<summary>Cap'n Proto C# code generator backend. This is the portable variant which depends on .NET Core 2.1 (as opposed to capnpc-csharp-win-x86)</summary>
|
||||
<copyright>Christian Köllner and contributors</copyright>
|
||||
<projectSourceUrl>https://github.com/c80k/capnproto-dotnetcore</projectSourceUrl>
|
||||
@ -22,15 +25,7 @@
|
||||
<releaseNotes>https://github.com/c80k/capnproto-dotnetcore/releases/tag/v$version$</releaseNotes>
|
||||
<dependencies>
|
||||
<dependency id="capnproto" version="0.7.0" />
|
||||
<dependency id="dotnetcore-runtime.install" version="2.1.6" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="chocolateyinstall.ps1" target="tools" />
|
||||
<file src="chocolateyuninstall.ps1" target="tools" />
|
||||
<file src=".\capnpc-csharp.ps1" target="tools" />
|
||||
<file src="..\LICENSE.txt" target="tools" />
|
||||
<file src="..\VERIFICATION.txt" target="tools" />
|
||||
<file src=".\bin\**" target="bin" />
|
||||
</files>
|
||||
<files/>
|
||||
</package>
|
@ -1,5 +1,5 @@
|
||||
param($version = "1.0.0")
|
||||
|
||||
$jversion = nbgv get-version -f json | ConvertFrom-Json
|
||||
$version = $($jversion.NuGetPackageVersion)
|
||||
$id = "capnpc-csharp"
|
||||
$id_win_x86 = "capnpc-csharp-win-x86"
|
||||
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
@ -10,7 +10,7 @@ $installDir = "$chocoDir\install"
|
||||
|
||||
dotnet build -c Release "$scriptDir\..\Capnp.Net.sln"
|
||||
dotnet publish -c Release -r win-x86 --self-contained -o "$chocoDir\$id_win_x86\bin" "$csprojDir\$csprojFile"
|
||||
dotnet publish -c Release -o "$chocoDir\$id\bin" "$csprojDir\$csprojFile"
|
||||
# dotnet publish -c Release -o "$chocoDir\$id\bin" "$csprojDir\$csprojFile"
|
||||
|
||||
If(!(test-path $installDir))
|
||||
{
|
||||
@ -21,3 +21,4 @@ Copy-Item "$scriptDir\..\LICENSE" -Destination "$chocoDir\LICENSE.txt"
|
||||
|
||||
choco pack "$chocoDir\$id\$id.nuspec" --version $version --outputdirectory $installDir
|
||||
choco pack "$chocoDir\$id_win_x86\$id_win_x86.nuspec" --version $version --outputdirectory $installDir
|
||||
Rename-Item -Path "$installDir\$id.$version.nupkg" -NewName "$id.$version-deprecated.nupkg"
|
14
version.json
Normal file
14
version.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
|
||||
"version": "1.3",
|
||||
"publicReleaseRefSpec": [
|
||||
"^refs/heads/master$",
|
||||
"^refs/heads/v\\d+(?:\\.\\d+)?$"
|
||||
],
|
||||
"cloudBuild": {
|
||||
"buildNumber": {
|
||||
"enabled": true,
|
||||
"setVersionVariables": true
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user