From 9a1e05103278f45e6ccc1080cc32afd362d0679b Mon Sep 17 00:00:00 2001 From: Kieranties Date: Tue, 17 Dec 2019 21:49:42 +0000 Subject: [PATCH 1/4] chore: Fix up build for netcore 3.1.00 --- Directory.Build.props | 7 ++++++- build.ps1 | 18 ++++++------------ global.json | 5 ++++- shared/logo.png | Bin 0 -> 1221 bytes src/App.props | 1 - .../SimpleVersion.Cake.csproj | 1 - src/SimpleVersion.Cake/logo.png | Bin 0 -> 3519 bytes .../SimpleVersion.Command.csproj | 2 ++ 8 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 shared/logo.png create mode 100644 src/SimpleVersion.Cake/logo.png diff --git a/Directory.Build.props b/Directory.Build.props index 6abccdd..4aa0308 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -25,10 +25,15 @@ semver;versioning;git https://github.com/Kieranties/SimpleVersion git - https://raw.github.com/Kieranties/SimpleVersion/master/docs/img/logo.png + logo.png MIT + + + + + true true diff --git a/build.ps1 b/build.ps1 index 1ea0185..97fb252 100644 --- a/build.ps1 +++ b/build.ps1 @@ -3,8 +3,8 @@ #> param( [ValidateSet('Debug', 'Release')] - [String]$Configuration = $env:Configuration, - [String]$Version = $env:Version, + [String]$Configuration = 'Debug', + [String]$Version = '1.0.0-local', [String]$RootPath = $PSScriptRoot, [String]$ArtifactsPath = (Join-Path $RootPath 'artifacts'), [String]$DocsPath = (Join-Path $RootPath 'docs'), @@ -28,24 +28,17 @@ function exec([string]$cmd) { $ErrorActionPreference = 'Stop' $env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 -if(!$Configuration) { - $Configuration = 'Debug' - $env:Configuration = $Configuration -} -if(!$Version) { - $Version = '1.0.0-local' - $env:Version = $Version -} if($ServeDocs) { $BuildDocs = $true } + # Build/Pack Remove-Item $ArtifactsPath -Recurse -Force -ErrorAction Ignore if(!$NoBuild) { - exec dotnet build + exec dotnet build --configuration $Configuration /p:Version=$Version $distArtifacts = Join-Path $ArtifactsPath 'dist' - exec dotnet pack --no-restore --no-build -o $distArtifacts + exec dotnet pack --no-build --no-restore --configuration $Configuration --output $distArtifacts # Unit Test $testArtifacts = Join-Path $ArtifactsPath 'tests' @@ -53,6 +46,7 @@ if(!$NoBuild) { ForEach-Object { $testArgs = @( '--no-restore', '--no-build' + '--configuration', $Configuration '--logger', 'trx' '-r', $testArtifacts '/p:CollectCoverage=true', "/p:MergeWith=$testArtifacts\coverage.json" diff --git a/global.json b/global.json index 99d7476..087ed9b 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,8 @@ { + "sdk" : { + "version" : "3.1.000" + }, "msbuild-sdks": { - "Microsoft.Build.CentralPackageVersions": "2.0.26" + "Microsoft.Build.CentralPackageVersions": "2.0.52" } } diff --git a/shared/logo.png b/shared/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2a9323dc1150a21266d76adfdaf363e356824ec3 GIT binary patch literal 1221 zcmV;$1UmbPP)N2bZe?^J zG%hhNHvLWs=l}o&LrFwIRCr$PnoB5kQ5457c?<{x&oUAzuK`MVl%h;XNg0R?7<>5%h%oaoQ?gj-MP+Pr>x&z zd#$zixhDAGk^tCMXzlIoL1$+t^!4?zJN)z|0CabEgUMt94-XG^ho2+>b`@F@fCL}` zNB|Om1Rw!O0207Y1+clf2?GNI1mf-OjosxVp#i+UzQX?gKBT6mf|HXI`1trhU0ogf zmXCx6aDRUfk&%%U{^p~lrG;5oFQEa<&(B*pk0U-lp4(Co7QpfGF-%NMdgsB)mB4TS7LkH8nNh>+7pJ zjcYnBEsaW@k>U;j%U4K9i0Y`Tt1H1sOiZM|v7^h)&86ffg17>}5YEfXQ=M0amzNie zjg3KRX(=2W958D!#61Fnf`Tjn;86rgYXPH0iXyS#U&CI6{P`zc>)2QpPy6PjK2*iDJh}cadvjbp5`M%0hnuUZVoasGBkOj zzP=u^va&RA0s;cyBh zt?feq7!`MScg)f{2@7CtZ4IWTrohh5&H@1D0?Z9OBoqKlig-?d+hcST_YT-ZnL8gF z8%tG$mxKU-Nez#>-j_u@H^7{*w6p{b4GqxW-%n=>JY^_=<>h6_$;r{Q&R7LfQc_@e zcvzPM65Rpd47RqmLUeSrX13kk-6`btZjEgQ08fH&Pk`$hXA)m=Ra8`fx3{;(@zBsv zXl`zX+uK|Aq`u+~0JC#pVWHa4pu-r>2?+_R)3`mxBXFboe{*pMfQO!nqsqYWMhKps zo={m?35SP=%-VQy1%PjJ@lEb~05}E*2jSu2fmwkN|!z06g}>pT*!X>ZIqhvI&5%q<;eV j^+)XEm(l - False False diff --git a/src/SimpleVersion.Cake/SimpleVersion.Cake.csproj b/src/SimpleVersion.Cake/SimpleVersion.Cake.csproj index 9f7222d..064def9 100644 --- a/src/SimpleVersion.Cake/SimpleVersion.Cake.csproj +++ b/src/SimpleVersion.Cake/SimpleVersion.Cake.csproj @@ -6,7 +6,6 @@ Cake.SimpleVersion $(PackageTags);Cake - https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/cake-contrib-medium.png diff --git a/src/SimpleVersion.Cake/logo.png b/src/SimpleVersion.Cake/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ecc9fa47c1808e6fb1c9003f1c35de2ec42c8f15 GIT binary patch literal 3519 zcmV;w4M6gVP)uhzPayj8`AbqNZV8? z$9K*>P5vbR|L*th^4HaQ%$`J{|lu}nkj-N38rd3qqCv;bcT{Q}c zpmu?a%Wpca=ZIbZmKQn%MF}C$N6E}e$)Ghx7nk4ObO4ZIy9#3ip^FehDHa+n*F|n? z@*|{Zs43#alpFz#-19)DSl~I}l~zfG#cDr~N0bs*HJSK3)yk2Wpv#2X-{Uxad& zI`%!I#O2Q_x!2_ay4Fx#Yyn}iL5ciO5&d@1LjMn>K8=& zbIOg+%OErN_>NhIG1BD^N{L`&ZiEb#IjI%^n9LZbhapA|g}?A=_Pqh(>u%{vsnERr z;kB?H+crD|ZO9PJtTb@S>4*A5MHZ4P_xwKB&wYo6KGVkpU{+0WClJ{Cl9WiO0VxgXkzQMfnIoG)%{)d$E6>BKmq0Y z!h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@9ezWLlOKi_1c}Lkz9Q?Z<)b_ov_!@k7^FMcJ<&Fa&bv;TT)cj(n&K0s-hpfel8uzg3BM6k{Jp4Ore3A2cb2i&*^DMi9Kwn886RQD># z&B*@?x0CZAe zAa{;{Xse@j!QMwQkSlZRS>OJKK330C84;$cWM8hzvsD$Ie^<{1zK*_tf;;Nsdb~%? z%Nr8_R}Ug8XH;A(+Lf#KS5AoHYKd(Rq+rvWIL<<>SG`@X=7h8>u+prW|8t|sy4Fn&b+lbgKC*>};_v~A&6gR85Bk$aH^$rG@%gs92f0dGNn@Hic tw93zu&+k%5gq!GE-A%3duVa9W{{urXlZ_)%>9+s?002ovPDHLkV1gG!i}3&e literal 0 HcmV?d00001 diff --git a/src/SimpleVersion.Command/SimpleVersion.Command.csproj b/src/SimpleVersion.Command/SimpleVersion.Command.csproj index b2d2a35..d141a16 100644 --- a/src/SimpleVersion.Command/SimpleVersion.Command.csproj +++ b/src/SimpleVersion.Command/SimpleVersion.Command.csproj @@ -6,6 +6,8 @@ Exe SimpleVersion + + $(NoWarn);NU5128 From 6786d2c119f6a8d31a6d75c72a1ec14c57607e6e Mon Sep 17 00:00:00 2001 From: Kieranties Date: Tue, 17 Dec 2019 21:49:42 +0000 Subject: [PATCH 2/4] chore: Fix up build for netcore 3.1 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 087ed9b..dbc243a 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk" : { - "version" : "3.1.000" + "version" : "3.1.100" }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.52" From a575e16d787fa58e7365e62825841bf04936f6cf Mon Sep 17 00:00:00 2001 From: Kieranties Date: Tue, 17 Dec 2019 22:12:19 +0000 Subject: [PATCH 3/4] chore: Update to latest vs2019 image use 3.0 sdk as LTS is not available yet --- azure-pipelines.yml | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 320be2e..3b64919 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,7 +25,7 @@ variables: jobs: - job: Windows pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 steps: # Install nuget diff --git a/global.json b/global.json index dbc243a..b29ac4d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk" : { - "version" : "3.1.100" + "version" : "3.0.100" }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.52" From 7eb16725954f4d1a5c7af9715c59729d4ff0b559 Mon Sep 17 00:00:00 2001 From: Kieranties Date: Wed, 18 Dec 2019 16:48:10 +0000 Subject: [PATCH 4/4] chore: Enforce LTS sdk using dotnet-install --- .gitignore | 1 + build.ps1 | 13 ++++++++++++- global.json | 3 --- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9778f7d..b193d50 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ log.txt /docs/api/*.yml /docs/api/.manifest coverage.json +dotnet-install.ps1 diff --git a/build.ps1 b/build.ps1 index 97fb252..51f12c2 100644 --- a/build.ps1 +++ b/build.ps1 @@ -12,9 +12,19 @@ param( [Switch]$NoBuild, [Switch]$BuildDocs, [Switch]$ServeDocs, - [String]$DocfxVersion = '2.42.0' + [String]$DocfxVersion = '2.42.0', + [string]$DotnetInstallScript = 'https://dot.net/v1/dotnet-install.ps1', + [string]$DotnetLocalInstallScript = (Join-Path $PSScriptRoot 'dotnet-install.ps1') ) +# Ensure we have the latest LTS installed for the user before processing further +function CheckDotNet { + if(-not(Test-Path $DotnetLocalInstallScript)){ + Invoke-WebRequest -Uri $DotnetInstallScript -OutFile $DotnetLocalInstallScript + } +. $DotnetLocalInstallScript +} + function exec([string]$cmd) { $currentPref = $ErrorActionPreference $ErrorActionPreference = 'Continue' @@ -32,6 +42,7 @@ if($ServeDocs) { $BuildDocs = $true } +CheckDotNet # Build/Pack Remove-Item $ArtifactsPath -Recurse -Force -ErrorAction Ignore diff --git a/global.json b/global.json index b29ac4d..2f8d256 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,4 @@ { - "sdk" : { - "version" : "3.0.100" - }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.52" }