Skip to content

Commit

Permalink
Beta1 for Version 2 integrating #9 and #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzoukr committed Feb 12, 2019
1 parent aad69b5 commit 9bac3a4
Show file tree
Hide file tree
Showing 7 changed files with 202 additions and 85 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ bower_components
node_modules
.fake
deploy/*
paket.exe
*/**/AssemblyInfo.fs
global.json
.paket/Paket.Restore.targets
Expand Down
Binary file added .paket/paket.exe
Binary file not shown.
126 changes: 80 additions & 46 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,72 +7,106 @@ open Fake.IO
open Fake.IO.Globbing.Operators
open Fake.Core.TargetOperators
open Fake.DotNet
open Fake.IO.FileSystemOperators

let appSrc = "src/CosmoStore"
module Target =
let runParallel n t = Target.run n t []

let package = "CosmoStore"
let github = package
let tags = "FSharp CosmosDB DocumentDB EventSourcing EventStore Azure TableStorage"
let description = "F# Event store for Azure Cosmos DB and Azure Table Storage"
let run par = par |> DotNet.exec id "run" |> ignore
let build par = par |> DotNet.build id |> ignore

Target.create "Build" (fun _ ->
appSrc |> DotNet.build id
)
type Project = {
Src : string
Tests : string
ReleaseNotes : ReleaseNotes.ReleaseNotes
Tags : string
Package : string
Description : string
}

Target.create "RunCosmosDbTests" (fun _ ->
"-p tests/CosmoStore.CosmosDb.Tests" |> DotNet.exec id "run" |> ignore
)
Target.create "RunTableStorageTests" (fun _ ->
"-p tests/CosmoStore.TableStorage.Tests" |> DotNet.exec id "run" |> ignore
)
let createProject projectName tags desc =
let src = "./src" |> Fake.IO.Path.getFullName
let tests = "./tests" |> Fake.IO.Path.getFullName
{
Src = src </> projectName
Tests = tests </> projectName
ReleaseNotes = src </> projectName </> "RELEASE_NOTES.md" |> ReleaseNotes.load
Tags = "F# FSharp EventStore EventSourcing " + tags
Package = projectName
Description = desc
}

Target.create "RunTests" (fun _ ->
let cosmoStore = createProject "CosmoStore" "" "F# Event Store API facade (for current implementation check CosmoStore.* packages)"
let tableStorage = createProject "CosmoStore.TableStorage" "Azure TableStorage" "F# Event Store for Azure Table Storage"
let cosmosDb = createProject "CosmoStore.CosmosDb" "Azure Cosmos DB" "F# Event Store for Azure Cosmos DB"

// building projects
Target.create "BuildCosmoStore" (fun _ -> cosmoStore.Src |> build)
Target.create "BuildTableStorage" (fun _ -> tableStorage.Src |> build)
Target.create "BuildCosmosDb" (fun _ -> cosmosDb.Src |> build)
Target.create "BuildAll" (fun _ ->
[
"RunCosmosDbTests"
"RunTableStorageTests"
]
|> List.iter (fun t -> Target.runSimple t [] |> ignore)
"BuildCosmoStore"
"BuildTableStorage"
"BuildCosmosDb"
] |> List.iter (Target.runParallel 3)
)

Fake.Core.Target.create "Clean" (fun _ ->
!! "src/*/bin"
++ "src/*/obj"
++ "tests/*/bin"
++ "tests/*/obj"
|> Shell.deleteDirs
// running tests
Target.create "TestTableStorage" (fun _ -> run "-p tests/CosmoStore.TableStorage.Tests")
Target.create "TestCosmosDb" (fun _ -> run "-p tests/CosmoStore.CosmosDb.Tests")
Target.create "TestAll" (fun _ ->
[
"TestTableStorage"
"TestCosmosDb"
]
|> List.iter (Target.runParallel 2)
)

// Read release notes & version info from RELEASE_NOTES.md
let release = ReleaseNotes.load "RELEASE_NOTES.md"

Target.create "Nuget" (fun _ ->
let toNotes = List.map (fun x -> x + System.Environment.NewLine) >> List.fold (+) ""
// nugets
let createNuget (project:Project) =
let args =
[
sprintf "PackageId=\"%s\"" package
sprintf "Title=\"%s\"" package
sprintf "Description=\"%s\"" description
sprintf "Summary=\"%s\"" description
sprintf "PackageVersion=\"%s\"" release.NugetVersion
sprintf "PackageReleaseNotes=\"%s\"" (release.Notes |> toNotes)
sprintf "PackageLicenseUrl=\"http://github.com/dzoukr/%s/blob/master/LICENSE.md\"" github
sprintf "PackageProjectUrl=\"http://github.com/dzoukr/%s\"" github
sprintf "Title=\"%s\"" project.Package
sprintf "Description=\"%s\"" project.Description
sprintf "Summary=\"%s\"" project.Description
sprintf "PackageVersion=\"%s\"" project.ReleaseNotes.NugetVersion
sprintf "PackageReleaseNotes=\"%s\"" (project.ReleaseNotes.Notes |> String.toLines)
"PackageLicenseUrl=\"http://github.com/dzoukr/CosmoStore/blob/master/LICENSE.md\""
"PackageProjectUrl=\"http://github.com/dzoukr/CosmosStore\""
"PackageIconUrl=\"\""
"PackageIconUrl=\"https://raw.githubusercontent.com/Dzoukr/CosmoStore/master/logo.png\""
sprintf "PackageTags=\"%s\"" tags
"Copyright=\"Roman Provazník - 2018\""
sprintf "PackageTags=\"%s\"" project.Tags
"Copyright=\"Roman Provazník - 2019\""
"Authors=\"Roman Provazník\""
]
|> List.map (fun x -> "/p:" + x)
|> String.concat " "


appSrc |> DotNet.pack (fun p -> { p with Configuration = DotNet.Custom "Release"; OutputPath = Some "../../nuget"; Common = { p.Common with CustomParams = Some args } })
)
project.Src
|> DotNet.pack (fun p -> { p with Configuration = DotNet.Custom "Release"; OutputPath = Some "../../nuget"; Common = { p.Common with CustomParams = Some args } })

"Clean" ==> "Build"
Target.create "NugetCosmoStore" (fun _ -> cosmoStore |> createNuget)
Target.create "NugetTableStorage" (fun _ -> tableStorage |> createNuget)
Target.create "NugetCosmosDb" (fun _ -> cosmosDb |> createNuget)
Target.create "NugetAll" (fun _ ->
[
"NugetCosmoStore"
"NugetTableStorage"
"NugetCosmosDb"
] |> List.iter (Target.runParallel 0)
)

Fake.Core.Target.create "Clean" (fun _ ->
!! "src/*/bin"
++ "src/*/obj"
++ "tests/*/bin"
++ "tests/*/obj"
|> Shell.deleteDirs
)

"RunTests" ==> "Clean" ==> "Nuget"
"Clean" ==> "TestTableStorage" ==> "NugetTableStorage"
"Clean" ==> "TestCosmosDb" ==> "NugetCosmosDb"

// start build
Fake.Core.Target.runOrDefault "Build"
Fake.Core.Target.runOrDefault "BuildAll"
76 changes: 40 additions & 36 deletions RELEASE_NOTES.md → src/CosmoStore.CosmosDb/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
### 1.5.1 - January 20 2019
* Fixing #8

### 1.5.0 - January 02 2019
* Added GetStream function (mentioned in #7)

### 1.4.0 - December 15 2018
* Appended events can be observed over IObservable

### 1.3.1 - December 10 2018
* Lowering versions of basic depedencies

### 1.3.0 - December 08 2018
* Removing Capacity union from configuration #5
* Reflexing changes in throughput range announced on MS Build 2018

### 1.2.0 - November 24 2018
* Fixing private functions visibility
* Unused DatabaseName configuration property renamed to TableName and used for specifying destination table

### 1.1.3 - November 09 2018
* Fixing issue with ExpectedPosition.NoStream #3

### 1.1.2 - October 26 2018
* Fixing problem with not storing Event metadata #1

### 1.1.1 - October 23 2018
* Package description update

### 1.1.0 - October 22 2018
* Added support for Azure Table Storage

### 1.0.1 - August 20 2018
* Fixing wrong package description

### 1.0.0 - August 20 2018
### 2.0.0-beta1 - February 12 2019
* Spliting project into several Nuget packages #10
* Adding CausationId #9

### 1.5.1 - January 20 2019
* Fixing #8

### 1.5.0 - January 02 2019
* Added GetStream function (mentioned in #7)

### 1.4.0 - December 15 2018
* Appended events can be observed over IObservable

### 1.3.1 - December 10 2018
* Lowering versions of basic depedencies

### 1.3.0 - December 08 2018
* Removing Capacity union from configuration #5
* Reflexing changes in throughput range announced on MS Build 2018

### 1.2.0 - November 24 2018
* Fixing private functions visibility
* Unused DatabaseName configuration property renamed to TableName and used for specifying destination table

### 1.1.3 - November 09 2018
* Fixing issue with ExpectedPosition.NoStream #3

### 1.1.2 - October 26 2018
* Fixing problem with not storing Event metadata #1

### 1.1.1 - October 23 2018
* Package description update

### 1.1.0 - October 22 2018
* Added support for Azure Table Storage

### 1.0.1 - August 20 2018
* Fixing wrong package description

### 1.0.0 - August 20 2018
* Initial release with support for Cosmos DB
2 changes: 0 additions & 2 deletions src/CosmoStore.TableStorage/EventStore.fs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ let private getEvent (table:CloudTable) streamId position =
return events.Head
}



let getEventStore (configuration:Configuration) =
let account =
match configuration.Account with
Expand Down
41 changes: 41 additions & 0 deletions src/CosmoStore.TableStorage/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
### 2.0.0-beta1 - February 12 2019
* Spliting project into several Nuget packages #10
* Adding CausationId #9

### 1.5.1 - January 20 2019
* Fixing #8

### 1.5.0 - January 02 2019
* Added GetStream function (mentioned in #7)

### 1.4.0 - December 15 2018
* Appended events can be observed over IObservable

### 1.3.1 - December 10 2018
* Lowering versions of basic depedencies

### 1.3.0 - December 08 2018
* Removing Capacity union from configuration #5
* Reflexing changes in throughput range announced on MS Build 2018

### 1.2.0 - November 24 2018
* Fixing private functions visibility
* Unused DatabaseName configuration property renamed to TableName and used for specifying destination table

### 1.1.3 - November 09 2018
* Fixing issue with ExpectedPosition.NoStream #3

### 1.1.2 - October 26 2018
* Fixing problem with not storing Event metadata #1

### 1.1.1 - October 23 2018
* Package description update

### 1.1.0 - October 22 2018
* Added support for Azure Table Storage

### 1.0.1 - August 20 2018
* Fixing wrong package description

### 1.0.0 - August 20 2018
* Initial release with support for Cosmos DB
41 changes: 41 additions & 0 deletions src/CosmoStore/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
### 2.0.0-beta1 - February 12 2019
* Spliting project into several Nuget packages #10
* Adding CausationId #9

### 1.5.1 - January 20 2019
* Fixing #8

### 1.5.0 - January 02 2019
* Added GetStream function (mentioned in #7)

### 1.4.0 - December 15 2018
* Appended events can be observed over IObservable

### 1.3.1 - December 10 2018
* Lowering versions of basic depedencies

### 1.3.0 - December 08 2018
* Removing Capacity union from configuration #5
* Reflexing changes in throughput range announced on MS Build 2018

### 1.2.0 - November 24 2018
* Fixing private functions visibility
* Unused DatabaseName configuration property renamed to TableName and used for specifying destination table

### 1.1.3 - November 09 2018
* Fixing issue with ExpectedPosition.NoStream #3

### 1.1.2 - October 26 2018
* Fixing problem with not storing Event metadata #1

### 1.1.1 - October 23 2018
* Package description update

### 1.1.0 - October 22 2018
* Added support for Azure Table Storage

### 1.0.1 - August 20 2018
* Fixing wrong package description

### 1.0.0 - August 20 2018
* Initial release with support for Cosmos DB

0 comments on commit 9bac3a4

Please sign in to comment.