Skip to content

Commit 4c07c81

Browse files
authored
Use GitVersion as a tool. (#5)
1 parent 301c29b commit 4c07c81

File tree

6 files changed

+37
-63
lines changed

6 files changed

+37
-63
lines changed

.travis.yml

Lines changed: 6 additions & 6 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
13-
- os: osx
12+
dist: xenial
13+
dotnet: 2.2
14+
- 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.Abstractions.Tests/ --no-build --configuration Release --framework netcoreapp2.1
20+
- dotnet build -c Release
21+
- dotnet test --configuration Release --no-build
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.Abstractions.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{859C9252-D63B-4ECB-9AB5-0BA8415C76AE}"
77
ProjectSection(SolutionItems) = preProject
88
.gitignore = .gitignore
9-
GitVersionConfig.yaml = GitVersionConfig.yaml
9+
GitVersion.yml = GitVersion.yml
1010
README.md = README.md
1111
stylecop.json = stylecop.json
1212
EndProjectSection

appveyor.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ configuration:
88
- Release
99
skip_tags: true
1010
before_build:
11-
- dotnet restore
11+
- dotnet tool install -g GitVersion.Tool --version 4.0.1-beta1-58
12+
- dotnet gitversion /l console /output buildserver
1213
build_script:
13-
- msbuild /p:GetVersion=True /p:WriteVersionInfoToBuildLog=True
14+
- dotnet build -c Release -p:Version=%GitVersion_NuGetVersion%
1415
test_script:
15-
- dotnet test test/Winton.DomainModelling.Abstractions.Tests/ --no-build --configuration Release
16+
- dotnet test -c Release --no-build
1617
artifacts:
1718
- path: .\**\*.nupkg
1819
name: NuGet

src/Winton.DomainModelling.Abstractions/Winton.DomainModelling.Abstractions.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 abstractions for domain modelling.</Description>
88
<GenerateDocumentationFile>True</GenerateDocumentationFile>
9-
<GetVersion>False</GetVersion>
109
<NoWarn>$(NoWarn);SA1101</NoWarn>
1110
<PackageId>Winton.DomainModelling.Abstractions</PackageId>
1211
<PackageIconUrl>https://raw.githubusercontent.com/wintoncode/Winton.DomainModelling.Abstractions/master/icon.jpg</PackageIconUrl>
@@ -21,7 +20,6 @@
2120
<TargetFramework>netstandard1.0</TargetFramework>
2221
<Title>Winton Domain Modelling Abstractions</Title>
2322
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
24-
<WriteVersionInfoToBuildLog>False</WriteVersionInfoToBuildLog>
2523
</PropertyGroup>
2624

2725
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
@@ -33,7 +31,6 @@
3331
</ItemGroup>
3432

3533
<ItemGroup>
36-
<PackageReference Include="GitVersionTask" Version="4.0.0-beta0012" PrivateAssets="All" />
3734
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="All" />
3835
</ItemGroup>
3936

0 commit comments

Comments
 (0)