Skip to content

Commit ade55f2

Browse files
authored
Merge pull request #447 from AArnott/dotnetFTW
Remove build.proj in favor of regular dotnet commands
2 parents 847044a + 497c6c5 commit ade55f2

File tree

6 files changed

+33
-58
lines changed

6 files changed

+33
-58
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,18 @@
22

33
Contributions are highly welcome, however, except for very small changes, kindly file an issue and let's have a discussion before you open a pull request.
44

5-
## Building The Project
5+
## Building the Project
66

77
Clone this repo:
88

9-
```bash
10-
git clone https://github.com/tonerdo/coverlet
11-
```
9+
git clone https://github.com/tonerdo/coverlet.git
10+
cd coverlet
1211

13-
Change directory to repo root:
12+
Building, testing, and packing use all the standard dotnet commands:
1413

15-
```bash
16-
cd coverlet
17-
```
18-
19-
Execute build script:
20-
21-
```bash
22-
dotnet msbuild build.proj
23-
```
24-
25-
This will result in the following:
26-
27-
* Restore all NuGet packages required for building
28-
* Build and publish all projects. Final binaries are placed into `<repo_root>\build\<Configuration>`
29-
* Build and run tests
30-
31-
These steps must be followed before you attempt to open the solution in an IDE (e.g. Visual Studio, Rider) for all projects to be loaded successfully.
14+
dotnet build
15+
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[coverlet.*]*"
16+
dotnet pack
3217

3318
## Performance testing
3419

@@ -48,8 +33,8 @@ For more realistic testing it is recommended to try out any changes to the hit c
4833

4934
Change to the directory of the library and run the msbuild code coverage command:
5035

51-
dotnet msbuild /t:BuildAndTest /p:Coverage=true
52-
36+
dotnet test /p:Coverage=true
37+
5338
To run with a development version of coverlet call `dotnet run` instead of the installed coverlet version, e.g.:
5439

55-
dotnet msbuild /t:BuildAndTest /p:Coverage=true /p:CoverageExecutablePath="dotnet run -p C:\...\coverlet\src\coverlet.console\coverlet.console.csproj"
40+
dotnet test /p:Coverage=true /p:CoverageExecutablePath="dotnet run -p C:\...\coverlet\src\coverlet.console\coverlet.console.csproj"

build.proj

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

build.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,18 @@ steps:
44
version: 2.2.300
55
displayName: Install .NET Core SDK
66

7-
- script: dotnet msbuild build.proj /p:Configuration=$(buildConfiguration)
8-
displayName: 'Run Build'
7+
- script: dotnet restore
8+
displayName: Restore packages
9+
10+
- script: dotnet build -c $(BuildConfiguration) --no-restore
11+
displayName: Build
12+
13+
- task: DotNetCoreCLI@2
14+
displayName: Test
15+
inputs:
16+
command: test
17+
arguments: -c $(BuildConfiguration) --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[coverlet.*]*
18+
testRunTitle: $(Agent.JobName)
19+
20+
- script: dotnet pack -c $(BuildConfiguration)
21+
displayName: Pack

eng/azure-pipelines-nightly.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
pool:
22
vmImage: 'windows-2019'
33
steps:
4-
- task: DotNetCoreInstaller@0
4+
- task: UseDotNet@2
55
inputs:
6-
version: '2.2.300'
6+
version: 2.2.300
77
- powershell:
88
.\eng\nightly.ps1 -apiKey $env:APIKEY -source $env:SOURCE
9-
ignoreLASTEXITCODE: "true"
9+
ignoreLASTEXITCODE: true
1010
env:
1111
APIKEY: $(apikey)
12-
SOURCE: $(source)
12+
SOURCE: $(source)

eng/nightly.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Write-Host -ForegroundColor Blue Publish with .NET CLI
1313
& dotnet --info
1414

1515
Write-Host -ForegroundColor Green Create Packages
16-
& dotnet msbuild "$PSScriptRoot\..\build.proj" /t:CreateNuGetPackage /p:Configuration=Release /p:PublicRelease=false # amend build.proj path if changes
16+
& dotnet pack -c Release
1717

1818
Write-Host -ForegroundColor Green Upload Packages
19-
& dotnet nuget push "$PSScriptRoot\..\build\Release\*.nupkg" -k $apiKey -s $source
19+
& dotnet nuget push "$PSScriptRoot\..\build\Release\*.nupkg" -k $apiKey -s $source

test/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage.json
2+
coverage.opencover.xml

0 commit comments

Comments
 (0)