Skip to content

Commit

Permalink
updated build script to support beta tags in release notes; added v1.…
Browse files Browse the repository at this point in the history
…4.0-beta3 release notes (#110)
  • Loading branch information
Aaronontheweb authored Feb 5, 2020
1 parent afdae4b commit 23ed8e9
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 10 deletions.
31 changes: 29 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
#### 1.4.0-beta2 October 31 2019 ####
Fixed [an issue with Snapshot serialization in v1.4.0-beta1](https://github.com/akkadotnet/Akka.Persistence.MongoDB/pull/98)
#### 1.4.0-beta3 February 04 2020 ####

Introduced legacy serialization modes.

[Going from v1.4.0 onwards, all events and snapshots are saved as byte arrays using the standard Akka.Persistence format](https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/72).

However, in the event that you have one of the following use cases:

1. Legacy data all stored in the original BSON / "object" format;
2. A use case where BSON is preferable, i.e. so it can be queried directly via MongoDb queries rather than Akka.Persistence.Query; or
3. A requirement to keep all data in human-readable form.

Then you can disable binary serialization (enabled by default) via the following HOCON:

```
akka.persistence.mongodb{
journal{
legacy-serialization = off
}
snapshot-store{
legacy-serialization = off
}
}
```

Setting `legacy-serialization = on` will allow you to save objects in a BSON format.

**WARNING**: However, `legacy-serialization = on` will break Akka.NET serialization. `IActorRef`s, Akka.Cluster.Sharding, `AtLeastOnceDelivery` actors, and other built-in Akka.NET use cases can't be properly supported using this format. Use it at your own risk.
17 changes: 11 additions & 6 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@ let solutionFile = FindFirstMatchingFile "*.sln" __SOURCE_DIRECTORY__ // dynami
let buildNumber = environVarOrDefault "BUILD_NUMBER" "0"
let hasTeamCity = (not (buildNumber = "0")) // check if we have the TeamCity environment variable for build # set
let preReleaseVersionSuffix = "beta" + (if (not (buildNumber = "0")) then (buildNumber) else DateTime.UtcNow.Ticks.ToString())
let releaseNotes =
File.ReadLines (__SOURCE_DIRECTORY__ @@ "RELEASE_NOTES.md")
|> ReleaseNotesHelper.parseReleaseNotes

let versionFromReleaseNotes =
match releaseNotes.SemVer.PreRelease with
| Some r -> r.Origin
| None -> ""

let versionSuffix =
match (getBuildParam "nugetprerelease") with
| "dev" -> preReleaseVersionSuffix
| "" -> ""
| "" -> versionFromReleaseNotes
| str -> str

let releaseNotes =
File.ReadLines "./RELEASE_NOTES.md"
|> ReleaseNotesHelper.parseReleaseNotes

// Directories
let toolsDir = __SOURCE_DIRECTORY__ @@ "tools"
Expand Down Expand Up @@ -139,7 +144,7 @@ Target "SignPackages" (fun _ ->
if(canSign) then
log "Signing information is available."

let assemblies = !! (outputNuGet @@ "*.nupkg")
let assemblies = !! (outputNuGet @@ "*.*upkg")

let signPath =
let globalTool = tryFindFileOnPath "SignClient.exe"
Expand Down
34 changes: 32 additions & 2 deletions src/common.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
<Project>
<PropertyGroup>
<Copyright>Copyright © 2013-2019 Akka.NET Project</Copyright>
<Copyright>Copyright © 2013-2020 Akka.NET Project</Copyright>
<Authors>Akka.NET Contrib</Authors>
<VersionPrefix>1.4.0</VersionPrefix>
<PackageIconUrl>http://getakka.net/images/akkalogo.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/akkadotnet/Akka.Persistence.MongoDB</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/akkadotnet/Akka.Persistence.MongoDB/blob/master/LICENSE.md</PackageLicenseUrl>
<PackageReleaseNotes>Fixed [an issue with Snapshot serialization in v1.4.0-beta1](https://github.com/akkadotnet/Akka.Persistence.MongoDB/pull/98)</PackageReleaseNotes>
<PackageReleaseNotes>Introduced legacy serialization modes.
[Going from v1.4.0 onwards, all events and snapshots are saved as byte arrays using the standard Akka.Persistence format](https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/72).
However, in the event that you have one of the following use cases:
1. Legacy data all stored in the original BSON / "object" format;
2. A use case where BSON is preferable, i.e. so it can be queried directly via MongoDb queries rather than Akka.Persistence.Query; or
3. A requirement to keep all data in human-readable form.
Then you can disable binary serialization (enabled by default) via the following HOCON:
```
akka.persistence.mongodb{
journal{
legacy-serialization = off
}
snapshot-store{
legacy-serialization = off
}
}
```
Setting `legacy-serialization = on` will allow you to save objects in a BSON format.
WARNING**: However, `legacy-serialization = on` will break Akka.NET serialization. `IActorRef`s, Akka.Cluster.Sharding, `AtLeastOnceDelivery` actors, and other built-in Akka.NET use cases can't be properly supported using this format. Use it at your own risk.</PackageReleaseNotes>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>Akka Persistence journal and snapshot store backed by MongoDB database.</Description>
<NoWarn>$(NoWarn);CS1591</NoWarn>
Expand All @@ -16,4 +34,16 @@
<TestSdkVersion>16.4.0</TestSdkVersion>
<AkkaVersion>1.4.0-beta4</AkkaVersion>
</PropertyGroup>
<!-- SourceLink support for all Akka.NET projects -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<PropertyGroup>
<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>
</PropertyGroup>
</Project>

0 comments on commit 23ed8e9

Please sign in to comment.