Modernize solution, publish package symbol (#226)
This commit is contained in:
Родитель
7299fa7345
Коммит
e22e61463e
|
@ -32,7 +32,7 @@ steps:
|
|||
displayName: 'FAKE Build'
|
||||
inputs:
|
||||
filename: build.cmd
|
||||
arguments: 'Nuget nugetpublishurl=https://www.nuget.org/api/v2/package nugetkey=$(nugetKey)'
|
||||
arguments: 'Nuget nugetpublishurl=https://api.nuget.org/v3/index.json nugetkey=$(nugetKey)'
|
||||
|
||||
- task: GitHubRelease@0
|
||||
displayName: 'GitHub release (create)'
|
||||
|
|
51
build.fsx
51
build.fsx
|
@ -202,31 +202,32 @@ Target "CreateNuget" (fun _ ->
|
|||
)
|
||||
|
||||
Target "PublishNuget" (fun _ ->
|
||||
|
||||
let projects = !! "./bin/nuget/*.nupkg" -- "./bin/nuget/*.symbols.nupkg"
|
||||
let apiKey = getBuildParamOrDefault "nugetkey" ""
|
||||
let source = getBuildParamOrDefault "nugetpublishurl" ""
|
||||
let symbolSource = getBuildParamOrDefault "symbolspublishurl" ""
|
||||
let shouldPublishSymbolsPackages = not (symbolSource = "")
|
||||
|
||||
if (not (source = "") && not (apiKey = "") && shouldPublishSymbolsPackages) then
|
||||
let runSingleProject project =
|
||||
DotNetCli.RunCommand
|
||||
(fun p ->
|
||||
{ p with
|
||||
TimeOut = TimeSpan.FromMinutes 10. })
|
||||
(sprintf "nuget push %s --api-key %s --source %s --symbol-source %s" project apiKey source symbolSource)
|
||||
|
||||
projects |> Seq.iter (runSingleProject)
|
||||
else if (not (source = "") && not (apiKey = "") && not shouldPublishSymbolsPackages) then
|
||||
let runSingleProject project =
|
||||
DotNetCli.RunCommand
|
||||
(fun p ->
|
||||
{ p with
|
||||
TimeOut = TimeSpan.FromMinutes 10. })
|
||||
(sprintf "nuget push %s --api-key %s --source %s" project apiKey source)
|
||||
|
||||
projects |> Seq.iter (runSingleProject)
|
||||
let shouldPushNugetPackages = hasBuildParam "nugetkey"
|
||||
if not shouldPushNugetPackages then ()
|
||||
else
|
||||
let apiKey = getBuildParam "nugetkey"
|
||||
let sourceUrl = getBuildParamOrDefault "nugetpublishurl" "https://api.nuget.org/v3/index.json"
|
||||
|
||||
let rec publishPackage retryLeft packageFile =
|
||||
tracefn "Pushing %s Attempts left: %d" (FullName packageFile) retryLeft
|
||||
let tracing = ProcessHelper.enableProcessTracing
|
||||
try
|
||||
try
|
||||
ProcessHelper.enableProcessTracing <- false
|
||||
DotNetCli.RunCommand
|
||||
(fun p ->
|
||||
{ p with
|
||||
TimeOut = TimeSpan.FromMinutes 10. })
|
||||
(sprintf "nuget push %s --api-key %s --source %s --no-service-endpoint" packageFile apiKey sourceUrl)
|
||||
with exn ->
|
||||
if (retryLeft > 0) then (publishPackage (retryLeft-1) packageFile)
|
||||
finally
|
||||
ProcessHelper.enableProcessTracing <- tracing
|
||||
|
||||
printfn "Pushing nuget packages"
|
||||
let normalPackages = !! (outputNuGet @@ "*.nupkg") |> Seq.sortBy(fun x -> x.ToLower())
|
||||
for package in normalPackages do
|
||||
publishPackage 3 package
|
||||
)
|
||||
|
||||
FinalTarget "KillCreatedProcesses" (fun _ ->
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 7.8 KiB |
|
@ -1,6 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(NetStandardLibVersion)</TargetFramework>
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<Description>Akka.Persistence.PostgreSql Microsoft.Extensions.Hosting support.</Description>
|
||||
</PropertyGroup>
|
||||
|
@ -13,4 +14,9 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\Akka.Persistence.PostgreSql\Akka.Persistence.PostgreSql.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="./README.md" Pack="true" PackagePath="\" />
|
||||
<None Include="../../docs/images/icon.png" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -18,12 +18,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{CADDD4C2
|
|||
..\build.fsx = ..\build.fsx
|
||||
..\build.ps1 = ..\build.ps1
|
||||
..\build.sh = ..\build.sh
|
||||
Directory.Build.props = Directory.Build.props
|
||||
Directory.Generated.props = Directory.Generated.props
|
||||
Directory.Packages.props = Directory.Packages.props
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Persistence.PostgreSql.Performance.Tests", "Akka.Persistence.PostgreSql.Performance.Tests\Akka.Persistence.PostgreSql.Performance.Tests.csproj", "{E5A31545-77AA-4BE1-A2A4-853256CC0F5E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Persistence.PostgreSql.Hosting", "Akka.Persistence.PostgreSql.Hosting\Akka.Persistence.PostgreSql.Hosting.csproj", "{0725302B-2814-48C6-944B-7E6F5CC72D8E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build-system", "build-system", "{E89C75C2-959B-4E92-9E4F-83275DAC4374}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
..\build-system\azure-pipeline.template.yaml = ..\build-system\azure-pipeline.template.yaml
|
||||
..\build-system\pr-validation.yaml = ..\build-system\pr-validation.yaml
|
||||
..\build-system\README.md = ..\build-system\README.md
|
||||
..\build-system\windows-release.yaml = ..\build-system\windows-release.yaml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -53,4 +64,7 @@ Global
|
|||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {721169D4-809B-4363-85B6-F30A313BC030}
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{E89C75C2-959B-4E92-9E4F-83275DAC4374} = {CADDD4C2-4EFC-4785-8958-35F50C1A8CEE}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
<PropertyGroup>
|
||||
<AssemblyTitle>Akka.Persistence.PostgreSql</AssemblyTitle>
|
||||
<Description>Akka Persistence journal and snapshot store backed by PostgreSql database.</Description>
|
||||
<TargetFrameworks>$(NetStandardLibVersion)</TargetFrameworks>
|
||||
<TargetFramework>$(NetStandardLibVersion)</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<LangVersion>11</LangVersion>
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -21,4 +23,9 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="../../README.md" Pack="true" PackagePath="\" />
|
||||
<None Include="../../docs/images/icon.png" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -4,10 +4,6 @@
|
|||
<PropertyGroup>
|
||||
<Copyright>Copyright © 2013-2023 Akka.NET Team</Copyright>
|
||||
<Authors>Akka.NET Team</Authors>
|
||||
<PackageIconUrl>http://getakka.net/images/akkalogo.png</PackageIconUrl>
|
||||
<PackageProjectUrl>https://github.com/akkadotnet/Akka.Persistence.PostgreSql</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://github.com/akkadotnet/Akka.Persistence.PostgreSql/blob/dev/LICENSE.md</PackageLicenseUrl>
|
||||
<PackageTags>akka;actors;actor model;Akka;concurrency;Postgres;PostgreSql</PackageTags>
|
||||
<LangVersion>11</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -26,9 +22,24 @@
|
|||
<PostgresLowVersion>5.0.11</PostgresLowVersion>
|
||||
<PostgresHighVersion>8</PostgresHighVersion>
|
||||
<PostgresVersion>[$(PostgresLowVersion), $(PostgresHighVersion))</PostgresVersion>
|
||||
|
||||
<TestSdkVersion>17.4.1</TestSdkVersion>
|
||||
<XunitVersion>2.5.0</XunitVersion>
|
||||
<XunitRunnerVersion>2.5.0</XunitRunnerVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- NuGet package properties -->
|
||||
<PropertyGroup>
|
||||
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<PackageProjectUrl>https://github.com/akkadotnet/Akka.Persistence.PostgreSql</PackageProjectUrl>
|
||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||
<PackageTags>akka;actors;actor model;Akka;concurrency;Postgres;PostgreSql</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- GitHub SourceLink -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>1.5.1.1</VersionPrefix>
|
||||
<PackageReleaseNotes>[Update Npgsql to v7.0.2](https://github.com/akkadotnet/akka.net/releases/tag/1.5.1.1)</PackageReleaseNotes>
|
||||
<VersionPrefix>1.5.4.1</VersionPrefix>
|
||||
<PackageReleaseNotes>Allow all 7.x major versions of Npgsql</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -16,8 +16,8 @@
|
|||
<PackageVersion Include="Akka.Hosting.TestKit" Version="$(AkkaVersion)" />
|
||||
<PackageVersion Include="FluentAssertions" Version="6.11.0" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageVersion Include="xunit" Version="$(XunitVersion)" />
|
||||
<PackageVersion Include="xunit.runner.visualstudio" Version="$(XunitRunnerVersion)" />
|
||||
<PackageVersion Include="xunit" Version="2.5.0" />
|
||||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.0" />
|
||||
<PackageVersion Include="Akka.TestKit.Xunit2" Version="$(AkkaVersion)" />
|
||||
<PackageVersion Include="Akka.Persistence.Sql.TestKit" Version="$(AkkaVersion)" />
|
||||
<PackageVersion Include="Docker.DotNet" Version="3.125.15" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче