Skip to content

Commit

Permalink
Updated .nuspec file and fixed build script
Browse files Browse the repository at this point in the history
  • Loading branch information
AGiorgetti committed Dec 3, 2021
1 parent 35d6f2a commit 8ff8ee5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ git submodule update
To build the project locally on a Windows Machine:

- Install [Chocolatey](https://chocolatey.org/).
- Optional: update `.\src\.nuget\NEventStore.Persistence.Sql.nuspec` file if needed (before creating relase packages).
- Open a Powershell console in Administrative mode and run the build script `build.ps1` in the root of the repository.

## How to contribute
Expand Down Expand Up @@ -96,6 +97,10 @@ You can leave all values as default. Now your repository is GitFlow enabled.

### Note on Nuget version on Nuspec

Remember to update `.\src\.nuget\NEventStore.Persistence.Sql.nuspec` file if needed (before creating relase packages).

The .nuspec file is needed because the new `dotnet pack` command has problems dealing with ProjectReferences, submodules get the wrong version number.

While we are on develop branch, (suppose we just bumped major number so the driver version number is 6.0.0-unstablexxxx), we need to declare that this persistence driver depends from a version greater than the latest published. If the latest version of NEventStore 5.x.x wave iw 5.4.0 we need to declare this package dependency as

(5.4, 7)
Expand Down
3 changes: 1 addition & 2 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
$configurationdefault = "Release"
$artifacts = "../../artifacts"
$nugetartifacts = "artifacts"

$configuration = Read-Host 'Configuration to build [default: Release] ?'
if ($configuration -eq '') {
Expand Down Expand Up @@ -48,4 +47,4 @@ Write-Host "NuGet Packages creation"
#dotnet pack ./src/NEventStore.Persistence.Sql/NEventStore.Persistence.Sql.Core.csproj --no-build -c $configuration -o $artifacts -p:NuspecFile="" -p:NuspecProperties="pippo=$configuration;version=$nugetversion"

#Write-Host nuget pack ./src/.nuget/NEventStore.Persistence.Sql.nuspec -properties "version=$nugetversion;configuration=$configuration"
nuget pack ./src/.nuget/NEventStore.Persistence.Sql.nuspec -properties "version=$nugetversion;configuration=$configuration" -OutputDirectory $nugetartifacts
nuget pack ./src/.nuget/NEventStore.Persistence.Sql.nuspec -properties "version=$nugetversion;configuration=$configuration" -OutputDirectory $artifacts
23 changes: 14 additions & 9 deletions src/.nuget/NEventStore.Persistence.Sql.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,24 @@
-->
<dependencies>
<group targetFramework=".NETFramework4.6.1">
<dependency id="NEventStore" version="[8.0.0,9.0.0)" exclude="Build,Analyzers"/>
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="5.0.0" exclude="Build,Analyzers" />
<dependency id="System.Data.SqlClient" version="4.8.2" exclude="Build,Analyzers" />
<dependency id="NEventStore" version="[9.0.0,10.0.0)" exclude="Build,Analyzers"/>
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="6.0.0" exclude="Build,Analyzers" />
<dependency id="System.Data.SqlClient" version="4.8.3" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0">
<dependency id="NEventStore" version="[9.0.0, 10.0.0)" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="6.0.0" exclude="Build,Analyzers" />
<dependency id="System.Data.SqlClient" version="4.8.3" exclude="Build,Analyzers" />
</group>
<group targetFramework="net5.0">
<dependency id="NEventStore" version="[8.0.0, 9.0.0)" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="5.0.0" exclude="Build,Analyzers" />
<dependency id="System.Data.SqlClient" version="4.8.2" exclude="Build,Analyzers" />
<dependency id="NEventStore" version="[9.0.0, 10.0.0)" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="6.0.0" exclude="Build,Analyzers" />
<dependency id="System.Data.SqlClient" version="4.8.3" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.0">
<dependency id="NEventStore" version="[8.0.0,9.0.0)" exclude="Build,Analyzers"/>
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="5.0.0" exclude="Build,Analyzers" />
<dependency id="System.Data.SqlClient" version="4.8.2" exclude="Build,Analyzers" />
<dependency id="NEventStore" version="[9.0.0,10.0.0)" exclude="Build,Analyzers"/>
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="6.0.0" exclude="Build,Analyzers" />
<dependency id="System.Data.SqlClient" version="4.8.3" exclude="Build,Analyzers" />
</group>
</dependencies>
<frameworkAssemblies>
Expand Down

0 comments on commit 8ff8ee5

Please sign in to comment.