Skip to content
This repository was archived by the owner on Jan 27, 2022. It is now read-only.

Commit 1f52f1a

Browse files
authored
Use GitVersion as a tool. (#17)
1 parent 7e13188 commit 1f52f1a

10 files changed

Lines changed: 40 additions & 63 deletions

File tree

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ env:
99
matrix:
1010
include:
1111
- os: linux
12-
dotnet: 2.1.301
12+
dist: xenial
13+
dotnet: 2.2
1314
- os: osx
1415
osx_image: xcode9 # OSX 10.12
15-
dotnet: 2.1.301
16+
dotnet: 2.2.104
1617
before_install:
1718
- ulimit -n 4096
1819
script:
19-
- dotnet restore
20-
- dotnet build --configuration Release
21-
- dotnet test test/Winton.DomainModelling.DocumentDb.Tests/ --no-build --configuration Release --framework netcoreapp2.1
20+
- dotnet build -c Release
21+
- dotnet test -c Release --no-build --filter Integration!=true
2222
notifications:
2323
on_success: always
2424
on_failure: always

GitVersion.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
assembly-versioning-scheme: MajorMinorPatch
2+
mode: ContinuousDeployment
3+
4+
branches:
5+
6+
master:
7+
regex: master
8+
tag: master
9+
increment: Minor
10+
prevent-increment-of-merged-branch-version: true
11+
feature:
12+
regex: feature[/-]
13+
tag: a{BranchName}
14+
increment: Minor
15+
prevent-increment-of-merged-branch-version: false
16+
patch:
17+
regex: patch[/-]
18+
tag: useBranchName
19+
increment: Patch
20+
prevent-increment-of-merged-branch-version: false
21+
source-branches: ['release']
22+
release:
23+
regex: release[/-]
24+
tag: rc
25+
increment: None
26+
prevent-increment-of-merged-branch-version: false

GitVersionConfig.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

Winton.DomainModelling.DocumentDb.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
99
.travis.yml = .travis.yml
1010
appveyor.yml = appveyor.yml
1111
CONTRIBUTING.md = CONTRIBUTING.md
12-
GitVersionConfig.yaml = GitVersionConfig.yaml
12+
GitVersion.yml = GitVersion.yml
1313
icon.jpg = icon.jpg
1414
LICENSE = LICENSE
1515
README.md = README.md

appveyor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ install:
1414
- ps: Import-Module "C:\Program Files\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator"
1515
- ps: Start-CosmosDbEmulator -NoUI -Timeout 0
1616
before_build:
17-
- dotnet restore
17+
- dotnet tool install -g GitVersion.Tool --version 4.0.1-beta1-58
18+
- dotnet gitversion /l console /output buildserver
1819
build_script:
19-
- msbuild /p:GetVersion=True /p:WriteVersionInfoToBuildLog=True
20+
- dotnet build -c Release -p:Version=%GitVersion_NuGetVersion%
2021
test_script:
21-
- dotnet test test/Winton.DomainModelling.DocumentDb.Tests/ --no-build --configuration Release
22-
- dotnet test test/Winton.DomainModelling.DocumentDb.IntegrationTests/ --no-build --configuration Release
22+
- dotnet test -c Release --no-build
2323
artifacts:
2424
- path: .\**\*.nupkg
2525
name: NuGet

src/Winton.DomainModelling.DocumentDb/Winton.DomainModelling.DocumentDb.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<Copyright>Copyright 2018 Winton</Copyright>
77
<Description>Provides common types for persisting domain objects to DocumentDB.</Description>
88
<GenerateDocumentationFile>True</GenerateDocumentationFile>
9-
<GetVersion>False</GetVersion>
109
<NoWarn>$(NoWarn);SA1101;SA1309</NoWarn>
1110
<PackageId>Winton.DomainModelling.DocumentDb</PackageId>
1211
<PackageIconUrl>https://raw.githubusercontent.com/wintoncode/Winton.DomainModelling.DocumentDb/master/icon.jpg</PackageIconUrl>
@@ -20,7 +19,6 @@
2019
<TargetFramework>netstandard1.6</TargetFramework>
2120
<Title>Winton Domain Modelling DocumentDB</Title>
2221
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
23-
<WriteVersionInfoToBuildLog>False</WriteVersionInfoToBuildLog>
2422
</PropertyGroup>
2523

2624
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
@@ -32,7 +30,6 @@
3230
</ItemGroup>
3331

3432
<ItemGroup>
35-
<PackageReference Include="GitVersionTask" Version="4.0.0-beta0012" PrivateAssets="All" />
3633
<PackageReference Include="Microsoft.Azure.DocumentDB.Core" Version="2.1.3" />
3734
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="All" />
3835
<PackageReference Include="Winton.DomainModelling.Abstractions" Version="1.1.0" />

test/Winton.DomainModelling.DocumentDb.IntegrationTests/EntityDtoPersistenceTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Winton.DomainModelling.DocumentDb
1616
{
17+
[Trait("Integration", "true")]
1718
public class EntityDtoPersistenceTests : IDisposable
1819
{
1920
private readonly Database _database;

test/Winton.DomainModelling.DocumentDb.IntegrationTests/EntityPersistenceTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Winton.DomainModelling.DocumentDb
1616
{
17+
[Trait("Integration", "true")]
1718
public class EntityPersistenceTests : IDisposable
1819
{
1920
private readonly Database _database;

test/Winton.DomainModelling.DocumentDb.IntegrationTests/ValueObjectDtoPersistenceTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
namespace Winton.DomainModelling.DocumentDb
1414
{
15+
[Trait("Integration", "true")]
1516
public class ValueObjectDtoPersistenceTests : IDisposable
1617
{
1718
private readonly Database _database;

test/Winton.DomainModelling.DocumentDb.IntegrationTests/ValueObjectPersistenceTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
namespace Winton.DomainModelling.DocumentDb
1515
{
16+
[Trait("Integration", "true")]
1617
public class ValueObjectPersistenceTests : IDisposable
1718
{
1819
private readonly Database _database;

0 commit comments

Comments
 (0)