Skip to content

Commit b98d91a

Browse files
authored
Split SSS.F#.Postgres to separate package (#17)
1 parent c12dc3e commit b98d91a

File tree

14 files changed

+337
-73
lines changed

14 files changed

+337
-73
lines changed

.github/workflows/pr.yml

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,64 @@ on:
44
pull_request:
55

66
jobs:
7-
build:
7+
check:
8+
name: Check for file modification
9+
outputs:
10+
run_job: ${{ steps.check_files.outputs.run_job }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 2
16+
- name: Run checker
17+
id: check_files
18+
run: |
19+
echo "List modified files"
20+
git diff --name-only HEAD^ HEAD
21+
echo "Check paths of modified files"
22+
git diff --name-only HEAD^ HEAD >files.txt
23+
24+
sssf=false
25+
sssfp=false
26+
27+
while IFS= read -r file; do
28+
echo $file
29+
if [[ $file == src/SqlStreamStore.FSharp/* ]]; then
30+
sssf=true
31+
elif [[ $file == src/SqlStreamStore.FSharp.Postgres/* ]]; then
32+
sssfp=true
33+
fi
34+
done <files.txt
35+
36+
rm -f files.txt
37+
38+
if [ $sssf = true ] && [ $sssfp = true ]; then
39+
echo "::set-output name=run_jobs:all"
40+
elif [ $sssf = true ] && [ $sssfp = false ]; then
41+
echo "::set-output name=run_jobs:sssf"
42+
elif [ $sssf = false ] && [ $sssfp = true ]; then
43+
echo "::set-output name=run_jobs:sssfp"
44+
else
45+
echo "::set-output name=run_jobs:none"
46+
fi
47+
48+
build-sss-f:
49+
needs: check
50+
if: ${{ needs.check.outputs.run_job }} == 'all' || ${{ needs.check.outputs.run_job }} == 'sssf'
51+
strategy:
52+
matrix:
53+
os: [ ubuntu-latest, macos-latest, windows-latest ]
54+
fail-fast: false
55+
runs-on: ${{ matrix.os }}
56+
name: Build on ${{ matrix.os }} using dotnet version ${{ matrix.dotnet }}
57+
steps:
58+
- uses: actions/checkout@v2
59+
- name: Build
60+
run: cd src/SqlStreamStore.FSharp; dotnet build --configuration Release
61+
62+
build-sss-f-postgres:
63+
needs: check
64+
if: ${{ needs.check.outputs.run_job }} == 'all' || ${{ needs.check.outputs.run_job }} == 'sssfp'
865
strategy:
966
matrix:
1067
os: [ ubuntu-latest, macos-latest, windows-latest ]
@@ -14,6 +71,8 @@ jobs:
1471
steps:
1572
- uses: actions/checkout@v2
1673
- name: Build
17-
run: dotnet build --configuration Release
18-
- name: Test
19-
run: dotnet test --no-restore --verbosity normal
74+
run: cd src/SqlStreamStore.FSharp.Postgres; dotnet build --configuration Release
75+
76+
# Put back when you add tests
77+
# - name: Test
78+
# run: dotnet test --no-restore

.github/workflows/publish_to_NuGet.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,31 @@ jobs:
1616
- uses: actions/checkout@v2
1717
- name: Build
1818
run: dotnet build --configuration Release
19-
- name: Test
20-
run: dotnet test --no-restore --verbosity normal
2119

22-
publish:
20+
# Put back when you add tests
21+
# - name: Test
22+
# run: dotnet test --no-restore
23+
24+
publish-sss-f:
25+
runs-on: ubuntu-latest
26+
needs: build
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Create the package
30+
run: cd src/SqlStreamStore.FSharp; dotnet pack --configuration Release -o ReleaseSSSF -p:PackageVersion=${GITHUB_REF/refs\/tags\/v/''} --include-source
31+
- name: Publish the package to NuGet
32+
env:
33+
NUGET_AUTH_TOKEN: ${{ secrets.SQLSTREAMSTORE_NUGET_AUTH_TOKEN }}
34+
run: dotnet nuget push ReleaseSSSF/*.nupkg --skip-duplicate --no-symbols true --source https://api.nuget.org/v3/index.json -k ${NUGET_AUTH_TOKEN}
35+
36+
publish-sss-f-postgres:
2337
runs-on: ubuntu-latest
2438
needs: build
2539
steps:
2640
- uses: actions/checkout@v2
2741
- name: Create the package
28-
run: dotnet pack --configuration Release -o Release -p:PackageVersion=${GITHUB_REF/refs\/tags\/v/''} --include-source
42+
run: cd src/SqlStreamStore.FSharp.Postgres; dotnet pack --configuration Release -o ReleaseSSSFP -p:PackageVersion=${GITHUB_REF/refs\/tags\/v/''} --include-source
2943
- name: Publish the package to NuGet
3044
env:
31-
NUGET_AUTH_TOKEN: ${{secrets.SQLSTREAMSTORE_NUGET_AUTH_TOKEN}}
32-
run: dotnet nuget push Release/*.nupkg --skip-duplicate --no-symbols true --source https://api.nuget.org/v3/index.json -k ${NUGET_AUTH_TOKEN}
45+
NUGET_AUTH_TOKEN: ${{ secrets.SQLSTREAMSTORE_POSTGRES_NUGET_AUTH_TOKEN }}
46+
run: dotnet nuget push ReleaseSSSFP/*.nupkg --skip-duplicate --no-symbols true --source https://api.nuget.org/v3/index.json -k ${NUGET_AUTH_TOKEN}

.gitignore

Lines changed: 129 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,133 @@
1-
.git/
2-
.idea/
3-
.vs
4-
.vscode
5-
.ionide
1+
2+
# Created by https://www.toptal.com/developers/gitignore/api/fsharp,rider,visualstudiocode,macos
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=fsharp,rider,visualstudiocode,macos
4+
5+
### fsharp ###
6+
lib/debug
7+
lib/release
8+
Debug
9+
*.suo
10+
*.user
11+
obj
12+
bin
13+
/build/
14+
*.exe
15+
!.paket/paket.bootstrapper.exe
16+
.ionide/
17+
18+
### macOS ###
19+
# General
620
.DS_Store
21+
.AppleDouble
22+
.LSOverride
23+
24+
# Icon must end with two \r
25+
Icon
26+
27+
28+
# Thumbnails
29+
._*
30+
31+
# Files that might appear in the root of a volume
32+
.DocumentRevisions-V100
33+
.fseventsd
34+
.Spotlight-V100
35+
.TemporaryItems
36+
.Trashes
37+
.VolumeIcon.icns
38+
.com.apple.timemachine.donotpresent
39+
40+
# Directories potentially created on remote AFP share
41+
.AppleDB
42+
.AppleDesktop
43+
Network Trash Folder
44+
Temporary Items
45+
.apdisk
46+
47+
### Rider ###
48+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
49+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
50+
51+
# User-specific stuff
52+
.idea/**/workspace.xml
53+
.idea/**/tasks.xml
54+
.idea/**/usage.statistics.xml
55+
.idea/**/dictionaries
56+
.idea/**/shelf
57+
58+
# Generated files
59+
.idea/**/contentModel.xml
60+
61+
# Sensitive or high-churn files
62+
.idea/**/dataSources/
63+
.idea/**/dataSources.ids
64+
.idea/**/dataSources.local.xml
65+
.idea/**/sqlDataSources.xml
66+
.idea/**/dynamic.xml
67+
.idea/**/uiDesigner.xml
68+
.idea/**/dbnavigator.xml
769

8-
src/bin
9-
src/obj
10-
tests/bin
11-
tests/obj
70+
# Gradle
71+
.idea/**/gradle.xml
72+
.idea/**/libraries
1273

13-
Release/
14-
site/
74+
# Gradle and Maven with auto-import
75+
# When using Gradle or Maven with auto-import, you should exclude module files,
76+
# since they will be recreated, and may cause churn. Uncomment if using
77+
# auto-import.
78+
# .idea/artifacts
79+
# .idea/compiler.xml
80+
# .idea/jarRepositories.xml
81+
# .idea/modules.xml
82+
# .idea/*.iml
83+
# .idea/modules
84+
# *.iml
85+
# *.ipr
86+
87+
# CMake
88+
cmake-build-*/
89+
90+
# Mongo Explorer plugin
91+
.idea/**/mongoSettings.xml
92+
93+
# File-based project format
94+
*.iws
95+
96+
# IntelliJ
97+
out/
98+
99+
# mpeltonen/sbt-idea plugin
100+
.idea_modules/
101+
102+
# JIRA plugin
103+
atlassian-ide-plugin.xml
104+
105+
# Cursive Clojure plugin
106+
.idea/replstate.xml
107+
108+
# Crashlytics plugin (for Android Studio and IntelliJ)
109+
com_crashlytics_export_strings.xml
110+
crashlytics.properties
111+
crashlytics-build.properties
112+
fabric.properties
113+
114+
# Editor-based Rest Client
115+
.idea/httpRequests
116+
117+
# Android studio 3.1+ serialized cache file
118+
.idea/caches/build_file_checksums.ser
119+
120+
### VisualStudioCode ###
121+
.vscode/*
122+
!.vscode/settings.json
123+
!.vscode/tasks.json
124+
!.vscode/launch.json
125+
!.vscode/extensions.json
126+
*.code-workspace
127+
128+
### VisualStudioCode Patch ###
129+
# Ignore all local history of files
130+
.history
131+
.ionide
15132

16-
mkdocs.yml
133+
# End of https://www.toptal.com/developers/gitignore/api/fsharp,rider,visualstudiocode,macos

SqlStreamStore.FSharp.sln

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
44
VisualStudioVersion = 15.0.26124.0
55
MinimumVisualStudioVersion = 15.0.26124.0
6-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SqlStreamStore.FSharp", "src\SqlStreamStore.FSharp.fsproj", "{22955019-D275-45AB-AD7C-B192BDB3F60F}"
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{24E90E3F-C82F-40B3-8918-B97E0FC5F36C}"
7+
EndProject
8+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SqlStreamStore.FSharp", "src\SqlStreamStore.FSharp\SqlStreamStore.FSharp.fsproj", "{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}"
9+
EndProject
10+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SqlStreamStore.FSharp.Postgres", "src\SqlStreamStore.FSharp.Postgres\SqlStreamStore.FSharp.Postgres.fsproj", "{81F77095-A424-4B08-A851-AF2DB393FE0D}"
711
EndProject
812
Global
13+
GlobalSection(SolutionProperties) = preSolution
14+
HideSolutionNode = FALSE
15+
EndGlobalSection
916
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1017
Debug|Any CPU = Debug|Any CPU
1118
Debug|x64 = Debug|x64
@@ -14,21 +21,34 @@ Global
1421
Release|x64 = Release|x64
1522
Release|x86 = Release|x86
1623
EndGlobalSection
17-
GlobalSection(SolutionProperties) = preSolution
18-
HideSolutionNode = FALSE
19-
EndGlobalSection
2024
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Debug|Any CPU.Build.0 = Debug|Any CPU
23-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Debug|x64.ActiveCfg = Debug|Any CPU
24-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Debug|x64.Build.0 = Debug|Any CPU
25-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Debug|x86.ActiveCfg = Debug|Any CPU
26-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Debug|x86.Build.0 = Debug|Any CPU
27-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Release|Any CPU.ActiveCfg = Release|Any CPU
28-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Release|Any CPU.Build.0 = Release|Any CPU
29-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Release|x64.ActiveCfg = Release|Any CPU
30-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Release|x64.Build.0 = Release|Any CPU
31-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Release|x86.ActiveCfg = Release|Any CPU
32-
{22955019-D275-45AB-AD7C-B192BDB3F60F}.Release|x86.Build.0 = Release|Any CPU
25+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Debug|Any CPU.Build.0 = Debug|Any CPU
27+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Debug|x64.ActiveCfg = Debug|Any CPU
28+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Debug|x64.Build.0 = Debug|Any CPU
29+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Debug|x86.ActiveCfg = Debug|Any CPU
30+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Debug|x86.Build.0 = Debug|Any CPU
31+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Release|x64.ActiveCfg = Release|Any CPU
34+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Release|x64.Build.0 = Release|Any CPU
35+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Release|x86.ActiveCfg = Release|Any CPU
36+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97}.Release|x86.Build.0 = Release|Any CPU
37+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Debug|x64.ActiveCfg = Debug|Any CPU
40+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Debug|x64.Build.0 = Debug|Any CPU
41+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Debug|x86.ActiveCfg = Debug|Any CPU
42+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Debug|x86.Build.0 = Debug|Any CPU
43+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Release|x64.ActiveCfg = Release|Any CPU
46+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Release|x64.Build.0 = Release|Any CPU
47+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Release|x86.ActiveCfg = Release|Any CPU
48+
{81F77095-A424-4B08-A851-AF2DB393FE0D}.Release|x86.Build.0 = Release|Any CPU
49+
EndGlobalSection
50+
GlobalSection(NestedProjects) = preSolution
51+
{7CC0EE2C-75B3-4746-B1C7-9400698D8E97} = {24E90E3F-C82F-40B3-8918-B97E0FC5F36C}
52+
{81F77095-A424-4B08-A851-AF2DB393FE0D} = {24E90E3F-C82F-40B3-8918-B97E0FC5F36C}
3353
EndGlobalSection
3454
EndGlobal

check-files-changed.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
echo "List modified files"
4+
git diff --name-only HEAD^ HEAD
5+
echo "Check paths of modified files"
6+
git diff --name-only HEAD^ HEAD >files.txt
7+
8+
sssf=false
9+
sssfp=false
10+
11+
while IFS= read -r file; do
12+
echo $file
13+
if [[ $file == src/SqlStreamStore.FSharp/* ]]; then
14+
sssf=true
15+
elif [[ $file == src/SqlStreamStore.FSharp.Postgres/* ]]; then
16+
sssfp=true
17+
fi
18+
done <files.txt
19+
20+
rm -f files.txt
21+
22+
if [ $sssf = true ] && [ $sssfp = true ]; then
23+
echo "::set-output name=run_jobs:all"
24+
elif [ $sssf = true ] && [ $sssfp = false ]; then
25+
echo "::set-output name=run_jobs:sssf"
26+
elif [ $sssf = false ] && [ $sssfp = true ]; then
27+
echo "::set-output name=run_jobs:sssfp"
28+
else
29+
echo "::set-output name=run_jobs:none"
30+
fi

src/Create.fs renamed to src/SqlStreamStore.FSharp.Postgres/Create.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace SqlStreamStore.FSharp
1+
namespace SqlStreamStore.FSharp.Postgres
22

33
open FSharp.Prelude
44
open SqlStreamStore
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<PackageId>SqlStreamStore.FSharp.Postgres</PackageId>
6+
<Authors>Jamil Maqdis Anton</Authors>
7+
<PackageDescription>Thin F# wrapper around SQLStreamStore.Postgres</PackageDescription>
8+
<RepositoryType>git</RepositoryType>
9+
<RepositoryUrl>https://github.com/jamil7/SQLStreamStore.FSharp</RepositoryUrl>
10+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
11+
<PackageTags>SqlStreamStore; FSharp; postgresql; cqrs; event-sourcing; event-store; stream-store</PackageTags>
12+
</PropertyGroup>
13+
14+
<ItemGroup>
15+
<Compile Include="Create.fs"/>
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="SqlStreamStore.Postgres" Version="1.2.0-beta.8"/>
20+
</ItemGroup>
21+
22+
<ItemGroup>
23+
<ProjectReference Include="..\SqlStreamStore.FSharp\SqlStreamStore.FSharp.fsproj"/>
24+
</ItemGroup>
25+
26+
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)