From 97db183d3f4c2156f283138cc1512fd90b60767d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Sat, 20 Nov 2021 09:22:50 +0000 Subject: [PATCH] Work CI-CD - Tidy up azure pipeline yaml. - Replace wildcard with solution name. - Add readme to nuspec. - Fix package owners in nuspec. - Fix log URL and typos in readme. - Update test framework ref and sub-module @ 9c1674d. - Update nbgv. --- README.md | 10 ++-- .../NFUnitTest_DummyAdapter.nfproj | 6 +- Tests/NFUnitTest_DummyAdapter/packages.config | 2 +- azure-pipelines.yml | 58 ++++++++++++++++--- nanoFramework.CoreLibrary.NoReflection.nuspec | 4 +- .../CoreLibrary.NoReflection.nfproj | 4 +- .../packages.config | 2 +- nanoFramework.CoreLibrary.nuspec | 4 +- nanoFramework.CoreLibrary/CoreLibrary.nfproj | 4 +- nanoFramework.CoreLibrary/packages.config | 2 +- nanoFramework.TestFramework | 2 +- 11 files changed, 72 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index d8bcc31f..1484e18f 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_lib-CoreLibrary&metric=alert_status)](https://sonarcloud.io/dashboard?id=nanoframework_lib-CoreLibrary) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_lib-CoreLibrary&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=nanoframework_lib-CoreLibrary) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![NuGet](https://img.shields.io/nuget/dt/nanoFramework.CoreLibrary.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.CoreLibrary/) [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/main/CONTRIBUTING.md) [![Discord](https://img.shields.io/discord/478725473862549535.svg?logo=discord&logoColor=white&label=Discord&color=7289DA)](https://discord.gg/gCyBu8T) -![nanoFramework logo](https://github.com/nanoframework/Home/blob/main/resources/logo/nanoFramework-repo-logo.png) +![nanoFramework logo](https://raw.githubusercontent.com/nanoframework/Home/main/resources/logo/nanoFramework-repo-logo.png) ----- -# Welcome to the **nanoFramework** Base Class Library repository! +# Welcome to the .NET **nanoFramework** Base Class Library repository ## Build status @@ -26,7 +26,7 @@ nanoFramework has a dedicated [Unit Test framework](https://github.com/nanoframe CoreLibrary has specific needs that differ from what you'll find in the documentation: -- You need to have the nanoFramework.TestFramework as a nuget package as it will bring the nanoCLR Win32 emulator +- You need to have the nanoFramework.TestFramework as a NuGet package as it will bring the nanoCLR Win32 emulator - You need to remove the reference to mscorlib, nanoFramework.TestFramework and nanoFramework.UnitTestLauncher - Use project reference instead for all those 3 elements @@ -51,7 +51,7 @@ vstest.console.exe .\Tests\NFUnitTestBitConverter\bin\Release\NFUnitTest.dll /S *Notes*: -- You have to build the TestAdapter from the source in this case. You can use the path to the nuget as well, this will have the same effect. +- You have to build the TestAdapter from the source in this case. You can use the path to the NuGet as well, this will have the same effect. - you have full diagnostic enabled in this case. ## Feedback and documentation @@ -70,7 +70,7 @@ The **nanoFramework** Class Libraries are licensed under the [MIT license](LICEN ## Code of Conduct -This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. +This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behaviour in our community. For more information see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). ### .NET Foundation diff --git a/Tests/NFUnitTest_DummyAdapter/NFUnitTest_DummyAdapter.nfproj b/Tests/NFUnitTest_DummyAdapter/NFUnitTest_DummyAdapter.nfproj index ad02e6e5..dd40ea29 100644 --- a/Tests/NFUnitTest_DummyAdapter/NFUnitTest_DummyAdapter.nfproj +++ b/Tests/NFUnitTest_DummyAdapter/NFUnitTest_DummyAdapter.nfproj @@ -40,13 +40,13 @@ True True - - ..\..\packages\nanoFramework.TestFramework.1.0.132\lib\nanoFramework.TestFramework.dll + + ..\..\packages\nanoFramework.TestFramework.1.0.157\lib\nanoFramework.TestFramework.dll True True - ..\..\packages\nanoFramework.TestFramework.1.0.132\lib\nanoFramework.UnitTestLauncher.exe + ..\..\packages\nanoFramework.TestFramework.1.0.157\lib\nanoFramework.UnitTestLauncher.exe True True diff --git a/Tests/NFUnitTest_DummyAdapter/packages.config b/Tests/NFUnitTest_DummyAdapter/packages.config index af86a8a0..4616b1db 100644 --- a/Tests/NFUnitTest_DummyAdapter/packages.config +++ b/Tests/NFUnitTest_DummyAdapter/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4abea2c0..fef7ecf3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,11 +2,13 @@ trigger: branches: include: [main, develop, "release-*" ] paths: - exclude: [README.md, LICENSE.md, NuGet.Config, .github_changelog_generator, .gitignore] + exclude: [README.md, LICENSE.md, CHANGELOG.md, CODE_OF_CONDUCT.md, NuGet.Config, .github_changelog_generator, .gitignore] tags: include: ["v*"] # PR always trigger build +pr: + autoCancel: true # add nf-tools repo to resources (for Azure Pipelines templates) resources: @@ -26,7 +28,7 @@ jobs: variables: DOTNET_NOLOGO: true - solution: '**/*.sln' + solution: 'nanoFramework.CoreLibrary.sln' buildPlatform: 'Any CPU' buildConfiguration: 'Release' nugetPackageName: 'nanoFramework.CoreLibrary' @@ -76,7 +78,12 @@ jobs: # need to push the other package to NuGet because the template above can only push one package (happens on all builds except PRs) - task: NuGetCommand@2 - condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), eq( variables['StartReleaseCandidate'], false ) ) + condition: >- + and( + succeeded(), + eq(variables['System.PullRequest.PullRequestId'], ''), + eq(variables['StartReleaseCandidate'], false) + ) displayName: Push "NoReflection" variant NuGet package to Azure Artifacts inputs: command: push @@ -88,7 +95,12 @@ jobs: continueOnError: true - task: NuGetCommand@2 - condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), eq( variables['StartReleaseCandidate'], false ) ) + condition: >- + and( + succeeded(), + eq(variables['System.PullRequest.PullRequestId'], ''), + eq(variables['StartReleaseCandidate'], false) + ) displayName: Push "NoReflection" variant NuGet package to Azure Artifacts inputs: command: push @@ -101,7 +113,13 @@ jobs: # create or update GitHub release - task: GithubRelease@1 - condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), not( startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ), ne( variables['StartReleaseCandidate'], true ) ) + condition: >- + and( + succeeded(), + eq(variables['System.PullRequest.PullRequestId'], ''), + not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v')), + ne(variables['StartReleaseCandidate'], true) + ) displayName: Create/Update GitHub PREVIEW release inputs: gitHubConnection: 'github.com_nano-$(System.TeamProject)' @@ -117,7 +135,13 @@ jobs: # create or update GitHub release ON tags from release or master branches - task: GithubRelease@1 - condition: and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), not(contains(variables['Build.SourceBranch'], 'preview') ), ne( variables['StartReleaseCandidate'], true ) ) + condition: >- + and( + succeeded(), + startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), + not(contains(variables['Build.SourceBranch'], 'preview')), + ne(variables['StartReleaseCandidate'], true) + ) displayName: Create/Update GitHub stable release inputs: gitHubConnection: 'github.com_nano-$(System.TeamProject)' @@ -133,7 +157,20 @@ jobs: ############################## - job: Update_Dependents - condition: or( and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['StartReleaseCandidate'], 'false') ), and( succeeded(), contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***'), eq(variables['StartReleaseCandidate'], 'false') ), eq(variables['UPDATE_DEPENDENTS'], 'true') ) + condition: >- + or( + and( + succeeded(), + startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), + eq(variables['StartReleaseCandidate'], 'false') + ), + and( + succeeded(), + contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***'), + eq(variables['StartReleaseCandidate'], 'false') + ), + eq(variables['UPDATE_DEPENDENTS'], 'true') + ) dependsOn: - Build_mscorlib @@ -190,7 +227,12 @@ jobs: dependsOn: - Build_mscorlib - Update_Dependents - condition: or( failed('Build_mscorlib'), failed('Build_mscorlib_no_reflection'), failed('Update_Dependents')) + condition: >- + or( + failed('Build_mscorlib'), + failed('Build_mscorlib_no_reflection'), + failed('Update_Dependents') + ) pool: vmImage: 'windows-2019' diff --git a/nanoFramework.CoreLibrary.NoReflection.nuspec b/nanoFramework.CoreLibrary.NoReflection.nuspec index d1691522..f67d4db9 100644 --- a/nanoFramework.CoreLibrary.NoReflection.nuspec +++ b/nanoFramework.CoreLibrary.NoReflection.nuspec @@ -5,10 +5,11 @@ $version$ nanoFramework.CoreLibrary.NoReflection nanoFramework project contributors - nanoFramework project contributors,dotnetfoundation + nanoFramework,dotnetfoundation false LICENSE.md + docs\README.md false https://github.com/nanoframework/CoreLibrary images\nf-logo.png @@ -25,6 +26,7 @@ + diff --git a/nanoFramework.CoreLibrary.NoReflection/CoreLibrary.NoReflection.nfproj b/nanoFramework.CoreLibrary.NoReflection/CoreLibrary.NoReflection.nfproj index e39eba35..60d28af6 100644 --- a/nanoFramework.CoreLibrary.NoReflection/CoreLibrary.NoReflection.nfproj +++ b/nanoFramework.CoreLibrary.NoReflection/CoreLibrary.NoReflection.nfproj @@ -406,11 +406,11 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. - + \ No newline at end of file diff --git a/nanoFramework.CoreLibrary.NoReflection/packages.config b/nanoFramework.CoreLibrary.NoReflection/packages.config index 4812d292..6f7c3459 100644 --- a/nanoFramework.CoreLibrary.NoReflection/packages.config +++ b/nanoFramework.CoreLibrary.NoReflection/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/nanoFramework.CoreLibrary.nuspec b/nanoFramework.CoreLibrary.nuspec index ca1325f1..9143d7ae 100644 --- a/nanoFramework.CoreLibrary.nuspec +++ b/nanoFramework.CoreLibrary.nuspec @@ -5,10 +5,11 @@ $version$ nanoFramework.CoreLibrary nanoFramework project contributors - nanoFramework project contributors,dotnetfoundation + nanoFramework,dotnetfoundation false LICENSE.md + docs\README.md false https://github.com/nanoframework/CoreLibrary images\nf-logo.png @@ -25,6 +26,7 @@ + diff --git a/nanoFramework.CoreLibrary/CoreLibrary.nfproj b/nanoFramework.CoreLibrary/CoreLibrary.nfproj index 4612b463..1b2d240e 100644 --- a/nanoFramework.CoreLibrary/CoreLibrary.nfproj +++ b/nanoFramework.CoreLibrary/CoreLibrary.nfproj @@ -398,11 +398,11 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. - + \ No newline at end of file diff --git a/nanoFramework.CoreLibrary/packages.config b/nanoFramework.CoreLibrary/packages.config index 4812d292..6f7c3459 100644 --- a/nanoFramework.CoreLibrary/packages.config +++ b/nanoFramework.CoreLibrary/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/nanoFramework.TestFramework b/nanoFramework.TestFramework index 10d54715..9c1674d1 160000 --- a/nanoFramework.TestFramework +++ b/nanoFramework.TestFramework @@ -1 +1 @@ -Subproject commit 10d5471522f26da929b82eba1be2a31fc2e1c469 +Subproject commit 9c1674d1a3f1a067641b4ffdebb37a4aea029f3e