Skip to content

Commit

Permalink
Updated .nuspec file and build script
Browse files Browse the repository at this point in the history
  • Loading branch information
AGiorgetti committed Dec 3, 2021
1 parent b341de4 commit 1749dc7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
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.Domain/NEventStore.Domain.Core.csproj --no-build -c $configuration -o $artifacts -p:NuspecFile="" -p:NuspecProperties="pippo=$configuration;version=$nugetversion"

#Write-Host nuget pack ./src/NEventStore.Domain/NEventStore.Domain.Core.csproj -properties "version=$nugetversion;configuration=$configuration"
nuget pack ./src/.nuget/NEventStore.Domain.nuspec -properties "version=$nugetversion;configuration=$configuration" -OutputDirectory $nugetartifacts
nuget pack ./src/.nuget/NEventStore.Domain.nuspec -properties "version=$nugetversion;configuration=$configuration" -OutputDirectory $artifacts
5 changes: 5 additions & 0 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ git submodule update
To build the project locally on a Windows Machine:

- Install [Chocolatey](https://chocolatey.org/).
- Optional: update `.\src\.nuget\NEventStore.Domain.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 @@ -88,6 +89,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.Domain.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
9 changes: 6 additions & 3 deletions src/.nuget/NEventStore.Domain.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@
-->
<dependencies>
<group targetFramework=".NETFramework4.6.1">
<dependency id="NEventStore" version="[8.0.0, 9.0.0)" exclude="Build,Analyzers" />
<dependency id="NEventStore" version="[9.0.0, 10.0.0)" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0">
<dependency id="NEventStore" version="[9.0.0, 10.0.0)" exclude="Build,Analyzers" />
</group>
<group targetFramework="net5.0">
<dependency id="NEventStore" version="[8.0.0, 9.0.0)" exclude="Build,Analyzers" />
<dependency id="NEventStore" version="[9.0.0, 10.0.0)" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.0">
<dependency id="NEventStore" version="[8.0.0, 9.0.0)" exclude="Build,Analyzers" />
<dependency id="NEventStore" version="[9.0.0, 10.0.0)" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
Expand Down

0 comments on commit 1749dc7

Please sign in to comment.