From a18c1f0ff68c9052df833c8618d349d407d54d02 Mon Sep 17 00:00:00 2001 From: Robert Coltheart <13191652+robertcoltheart@users.noreply.github.com> Date: Tue, 10 Nov 2020 13:49:00 +0800 Subject: [PATCH] Fix building of tag versions (#111) * Fix building of tag versions * Update .appveyor.yml * fix --- .appveyor.yml | 34 ++++++------------- .gitignore | 1 + build/run-tests.ps1 | 17 ---------- .../SpeakEasy.IntegrationTests.csproj | 3 -- .../SpeakEasy.Specifications.csproj | 6 ---- src/SpeakEasy.sln | 5 ++- src/SpeakEasy/SpeakEasy.csproj | 1 - 7 files changed, 14 insertions(+), 53 deletions(-) delete mode 100644 build/run-tests.ps1 diff --git a/.appveyor.yml b/.appveyor.yml index cbbd015..5686484 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,34 +1,21 @@ skip_branch_with_pr: true -# build cache to preserve files/folders between builds -cache: - - '%LocalAppData%\NuGet\v3-cache' - -image: Visual Studio 2017 +image: Visual Studio 2019 configuration: Release -install: - - choco install gitversion.portable -pre -y - - cmd: dotnet restore src\SpeakEasy.sln +before_build: - ps: gitversion /l console /output buildserver -dotnet_csproj: - patch: true - file: 'src\**\*.csproj' - version: $(GitVersion_NuGetVersion) - package_version: $(GitVersion_NuGetVersion) - assembly_version: $(GitVersion_MajorMinorPatch) - file_version: $(GitVersion_MajorMinorPatch) - informational_version: $(GitVersion_MajorMinorPatch) - -build: - parallel: true - project: src\SpeakEasy.sln - publish_nuget: true - publish_nuget_symbols: true +build_script: + - ps: dotnet restore src\SpeakEasy.sln + - ps: dotnet build src\SpeakEasy.sln --no-restore --configuration Release /p:Version=$env:GitVersion_SemVer /p:AssemblyVersion=$env:GitVersion_AssemblySemVer /p:FileVersion=$env:GitVersion_AssemblySemFileVer /p:InformationalVersion=$env:GitVersion_InformationalVersion + - ps: dotnet pack src\SpeakEasy.sln --configuration Release --no-restore --no-build --output artifacts /p:Version=$env:GitVersion_SemVer test_script: - - ps: .\build\run-tests.ps1 + - ps: dotnet test src\SpeakEasy.sln + +artifacts: + - path: artifacts/* deploy: provider: NuGet @@ -37,3 +24,4 @@ deploy: secure: oG6FNO1zPKE7PDFAlOw9AmsVV2ZxO3VIWorkUXD4oKALfTd+p8E1IYIf22ZyS3LU on: appveyor_repo_tag: true + artifact: /.*\.nupkg/ diff --git a/.gitignore b/.gitignore index 96237bf..bedf851 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ _ReSharper*/ #NuGet packages/ +artifacts/ #ncrunch *ncrunch* diff --git a/build/run-tests.ps1 b/build/run-tests.ps1 deleted file mode 100644 index b382855..0000000 --- a/build/run-tests.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -$testExitCode = 0 - -Get-ChildItem src\*.Specifications ` -| select -ExpandProperty Name ` -| % { - dotnet test "src\\$_" -c Release --no-build --logger trx --results-directory (Join-Path $(pwd) test_results) - $testExitCode += $LASTEXITCODE -} - -Get-ChildItem src\*.IntegrationTests ` -| select -ExpandProperty Name ` -| % { - dotnet test "src\\$_" -c Release --no-build --logger trx --results-directory (Join-Path $(pwd) test_results) - $testExitCode += $LASTEXITCODE -} - -if ($testExitCode -ne 0) { $host.SetShouldExit($testExitCode); throw; } diff --git a/src/SpeakEasy.IntegrationTests/SpeakEasy.IntegrationTests.csproj b/src/SpeakEasy.IntegrationTests/SpeakEasy.IntegrationTests.csproj index 2cc9315..0ae3dc2 100644 --- a/src/SpeakEasy.IntegrationTests/SpeakEasy.IntegrationTests.csproj +++ b/src/SpeakEasy.IntegrationTests/SpeakEasy.IntegrationTests.csproj @@ -1,7 +1,6 @@  - 2.0.0 jonnii netcoreapp2.1 SpeakEasy.IntegrationTests @@ -27,8 +26,6 @@ all runtime; build; native; contentfiles; analyzers - - diff --git a/src/SpeakEasy.Specifications/SpeakEasy.Specifications.csproj b/src/SpeakEasy.Specifications/SpeakEasy.Specifications.csproj index 4812b0d..380a3bc 100644 --- a/src/SpeakEasy.Specifications/SpeakEasy.Specifications.csproj +++ b/src/SpeakEasy.Specifications/SpeakEasy.Specifications.csproj @@ -1,7 +1,6 @@  - 2.0.0 jonnii netcoreapp2.1 SpeakEasy.Specifications @@ -23,9 +22,4 @@ - - - - - diff --git a/src/SpeakEasy.sln b/src/SpeakEasy.sln index 1393ffb..80f9bf2 100755 --- a/src/SpeakEasy.sln +++ b/src/SpeakEasy.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27004.2008 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30621.155 MinimumVisualStudioVersion = 15.0.26124.0 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpeakEasy", "SpeakEasy\SpeakEasy.csproj", "{ACFAEFBE-EE50-459F-B7DF-8C30068626CF}" EndProject @@ -15,7 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{7044505B-5 ..\GitVersion.yml = ..\GitVersion.yml ..\LICENSE.txt = ..\LICENSE.txt ..\README.md = ..\README.md - ..\VERSION = ..\VERSION EndProjectSection EndProject Global diff --git a/src/SpeakEasy/SpeakEasy.csproj b/src/SpeakEasy/SpeakEasy.csproj index 2d32200..53ebc1e 100644 --- a/src/SpeakEasy/SpeakEasy.csproj +++ b/src/SpeakEasy/SpeakEasy.csproj @@ -3,7 +3,6 @@ SpeakEasy... making http easy! SpeakEasy - 1.0.0 jonnii netstandard2.0 SpeakEasy