Skip to content

Commit 93c0b35

Browse files
authored
Use GitVersion as a build tool rather than a csproj dependency. (#5)
1 parent 00bea33 commit 93c0b35

File tree

6 files changed

+36
-62
lines changed

6 files changed

+36
-62
lines changed

.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.AspNetCore.Tests/ --no-build --configuration Release --framework netcoreapp2.1
20+
- dotnet build -c Release
21+
- dotnet test -c 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.AspNetCore.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 & 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.AspNetCore.Tests/ --no-build --configuration Release
16+
- dotnet test -c Release --no-restore --no-build
1617
artifacts:
1718
- path: .\**\*.nupkg
1819
name: NuGet

src/Winton.DomainModelling.AspNetCore/Winton.DomainModelling.AspNetCore.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 conventions for creating an ASP.NET Core based REST API on top of a domain model.</Description>
88
<GenerateDocumentationFile>True</GenerateDocumentationFile>
9-
<GetVersion>False</GetVersion>
109
<NoWarn>$(NoWarn);SA1101;SA1309</NoWarn>
1110
<PackageId>Winton.DomainModelling.AspNetCore</PackageId>
1211
<PackageIconUrl>https://raw.githubusercontent.com/wintoncode/Winton.DomainModelling.AspNetCore/master/icon.jpg</PackageIconUrl>
@@ -20,7 +19,6 @@
2019
<TargetFramework>netstandard2.0</TargetFramework>
2120
<Title>Winton Domain Modelling ASP.NET Core</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.AspNetCore.Mvc.Core" Version="2.0.0" />
3734
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="All" />
3835
<PackageReference Include="Winton.DomainModelling.Abstractions" Version="1.1.0" />

0 commit comments

Comments
 (0)