diff --git a/Documentation/ConsumeNightlyBuild.md b/Documentation/ConsumeNightlyBuild.md index e65da90..d8c21bb 100644 --- a/Documentation/ConsumeNightlyBuild.md +++ b/Documentation/ConsumeNightlyBuild.md @@ -1,11 +1,5 @@ # Consume nightly build -You can check the metadata of nightly build packages here: - -MSBuild https://www.myget.org/feed/coverlet-dev/package/nuget/coverlet.msbuild -VSTest collector https://www.myget.org/feed/coverlet-dev/package/nuget/coverlet.collector -.NET tools https://www.myget.org/feed/coverlet-dev/package/nuget/coverlet.console - To consume nightly builds, create a `NuGet.Config` in your root solution directory and add the following content: ```xml @@ -14,7 +8,7 @@ To consume nightly builds, create a `NuGet.Config` in your root solution directo - + @@ -31,31 +25,19 @@ Visual Studio: NuGet (Package Manager console): ```powershell -PM> Install-Package coverlet.msbuild -Version 2.6.25-g6209239d69 -Source https://www.myget.org/F/coverlet-dev/api/v3/index.json +PM> Install-Package coverlet.msbuild -Version 3.0.0-preview.18.g183cbed8a6 -Source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json ``` .NET CLI: ```bash - dotnet add package coverlet.msbuild --version 2.6.25-g6209239d69 --source https://www.myget.org/F/coverlet-dev/api/v3/index.json + dotnet add package coverlet.msbuild --version 3.0.0-preview.18.g183cbed8a6 --source https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json ``` MSBuild project file: ```xml - + ``` -### How to verify version - -You can understand which version you're using by comparing nightly build release date with repo commits. - -For instance if we want to consume last msbuild nightly build: - -* Go to https://www.myget.org/feed/coverlet-dev/package/nuget/coverlet.msbuild -* Scroll down the page and check release date -![File](images/nightly_1.PNG) -* Go to repo commits and compare date and first part of commit hash -![File](images/nightly_2.PNG) - -As you can see we build at 00.00 UTC and build takes some seconds, so it's possible that release date won't be the same as repo commits. +_Note: The version provided here is just an example, you should use the latest when possible_ diff --git a/Documentation/images/nightly.PNG b/Documentation/images/nightly.PNG index 6e7bc58..9c84d3d 100644 Binary files a/Documentation/images/nightly.PNG and b/Documentation/images/nightly.PNG differ diff --git a/Documentation/images/nightly_1.PNG b/Documentation/images/nightly_1.PNG deleted file mode 100644 index a976ade..0000000 Binary files a/Documentation/images/nightly_1.PNG and /dev/null differ diff --git a/Documentation/images/nightly_2.PNG b/Documentation/images/nightly_2.PNG deleted file mode 100644 index 705d70a..0000000 Binary files a/Documentation/images/nightly_2.PNG and /dev/null differ diff --git a/coverlet.sln b/coverlet.sln index 4ec7ed7..17d7126 100644 --- a/coverlet.sln +++ b/coverlet.sln @@ -35,7 +35,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets global.json = global.json - eng\nightly.ps1 = eng\nightly.ps1 EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "coverlet.tests.projectsample.excludedbyattribute", "test\coverlet.tests.projectsample.excludedbyattribute\coverlet.tests.projectsample.excludedbyattribute.csproj", "{D6B14F2F-9E7D-4D2C-BAC8-48834F853ED6}" diff --git a/eng/azure-pipelines-nightly.yml b/eng/azure-pipelines-nightly.yml index a7a94cc..fb6eac9 100644 --- a/eng/azure-pipelines-nightly.yml +++ b/eng/azure-pipelines-nightly.yml @@ -1,15 +1,35 @@ pool: vmImage: 'windows-2019' + steps: - task: UseDotNet@2 inputs: version: 2.2.402 + displayName: Install .NET Core SDK 2.2.402 + - task: UseDotNet@2 inputs: version: 3.1.401 -- powershell: - .\eng\nightly.ps1 -apiKey $env:APIKEY -source $env:SOURCE - ignoreLASTEXITCODE: true - env: - APIKEY: $(apikey) - SOURCE: $(source) + displayName: Install .NET Core SDK 3.1.401 + +- task: NuGetAuthenticate@0 + displayName: Authenticate with NuGet feeds + +- script: dotnet pack -c Release /p:PublicRelease=false + displayName: Create NuGet packages + +- task: NuGetCommand@2 + inputs: + command: push + packagesToPush: $(Build.SourcesDirectory)/bin/Release/Packages/*.nupkg + nuGetFeedType: internal + publishVstsFeed: coverlet/coverlet-nightly + displayName: Publish NuGet packages + +- task: NuGetCommand@2 + inputs: + command: push + packagesToPush: $(Build.SourcesDirectory)/bin/Release/Packages/*.snupkg + nuGetFeedType: internal + publishVstsFeed: coverlet/coverlet-nightly + displayName: Publish NuGet symbol packages diff --git a/eng/build.yml b/eng/build.yml index 9435212..c52f319 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -2,12 +2,12 @@ steps: - task: UseDotNet@2 inputs: version: 2.2.402 - displayName: Install .NET Core SDK + displayName: Install .NET Core SDK 2.2.402 - task: UseDotNet@2 inputs: version: 3.1.401 - displayName: Install .NET Core SDK + displayName: Install .NET Core SDK 3.1.401 - script: dotnet restore displayName: Restore packages @@ -19,7 +19,7 @@ steps: displayName: Pack - task: DotNetCoreCLI@2 - displayName: Test + displayName: Run tests inputs: command: test arguments: -c $(BuildConfiguration) --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include="[coverlet.collector]*%2c[coverlet.core]*%2c[coverlet.msbuild.tasks]*" /p:Exclude="[coverlet.core.tests.samples.netstandard]*%2c[coverlet.tests.xunit.extensions]*" diff --git a/eng/nightly.ps1 b/eng/nightly.ps1 deleted file mode 100644 index 68041d9..0000000 --- a/eng/nightly.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -param ( - [string]$apiKey, - [string]$source - ) - -if (!$apiKey -or !$source) -{ - Write-Host -ForegroundColor Red Specify apiKey and source - exit -} - -Write-Host -ForegroundColor Blue Publish with .NET CLI -& dotnet --info - -Write-Host -ForegroundColor Green Create Packages -& dotnet pack -c Release /p:PublicRelease=false - -Write-Host -ForegroundColor Green Upload Packages -& dotnet nuget push "$PSScriptRoot\..\bin\Release\Packages\*.nupkg" -k $apiKey -s $source