From 47a7a4bcf1a6a8a5c3eb4b8d73fae200b8520cee Mon Sep 17 00:00:00 2001 From: Oren Novotny Date: Thu, 1 Feb 2018 20:15:31 -0500 Subject: [PATCH 1/3] Auto versioning with NB.GV --- Ben.Demystifier.sln | 10 +++++++++- build.ps1 | 7 +------ src/Ben.Demystifier/Ben.Demystifier.csproj | 5 +++-- version.json | 17 +++++++++++++++++ 4 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 version.json diff --git a/Ben.Demystifier.sln b/Ben.Demystifier.sln index dbecaf3..2cf7ecd 100644 --- a/Ben.Demystifier.sln +++ b/Ben.Demystifier.sln @@ -13,7 +13,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ben.Demystifier.Test", "tes EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{455921D3-DD54-4355-85CF-F4009DF2AB70}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackTrace", "sample\StackTrace\StackTrace.csproj", "{E161FC12-53C2-47CD-A5FC-3684B86723A9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackTrace", "sample\StackTrace\StackTrace.csproj", "{E161FC12-53C2-47CD-A5FC-3684B86723A9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5937ACDF-0059-488E-9604-D84689C72933}" + ProjectSection(SolutionItems) = preProject + appveyor.yml = appveyor.yml + build.ps1 = build.ps1 + directory.build.props = directory.build.props + version.json = version.json + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/build.ps1 b/build.ps1 index d0bacc3..7b5ffcc 100644 --- a/build.ps1 +++ b/build.ps1 @@ -22,11 +22,6 @@ function Exec if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse } -exec { & dotnet restore } - -$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; -$revision = "{0:D4}" -f [convert]::ToInt32($revision, 10) - exec { & dotnet test .\test\Ben.Demystifier.Test -c Release } -exec { & dotnet pack .\src\Ben.Demystifier -c Release -o .\artifacts --version-suffix=$revision } \ No newline at end of file +exec { & dotnet pack .\src\Ben.Demystifier -c Release -o .\artifacts } diff --git a/src/Ben.Demystifier/Ben.Demystifier.csproj b/src/Ben.Demystifier/Ben.Demystifier.csproj index 641ce7c..9ab49a6 100644 --- a/src/Ben.Demystifier/Ben.Demystifier.csproj +++ b/src/Ben.Demystifier/Ben.Demystifier.csproj @@ -9,9 +9,8 @@ https://github.com/benaadams/Ben.Demystifier https://github.com/benaadams/Ben.Demystifier/blob/master/LICENSE git - true true - 0.0.7 + embedded @@ -19,6 +18,8 @@ + + 1.5.0 diff --git a/version.json b/version.json new file mode 100644 index 0000000..86532f5 --- /dev/null +++ b/version.json @@ -0,0 +1,17 @@ +{ + "version": "0.0", + "publicReleaseRefSpec": [ + "^refs/heads/master$", // we release out of master + "^refs/heads/dev$", // we release out of develop + "^refs/tags/v\\d+\\.\\d+" // we also release tags starting with vN.N + ], + "nugetPackageVersion":{ + "semVer": 2 + }, + "cloudBuild": { + "buildNumber": { + "enabled": true, + "setVersionVariables": true + } + } +} From bf29db9e76b632b9de9bccebebe33e87122f4201 Mon Sep 17 00:00:00 2001 From: Oren Novotny Date: Thu, 1 Feb 2018 20:21:47 -0500 Subject: [PATCH 2/3] Add strong name key --- src/Ben.Demystifier/Ben.Demystifier.csproj | 2 ++ src/Ben.Demystifier/key.snk | Bin 0 -> 596 bytes 2 files changed, 2 insertions(+) create mode 100644 src/Ben.Demystifier/key.snk diff --git a/src/Ben.Demystifier/Ben.Demystifier.csproj b/src/Ben.Demystifier/Ben.Demystifier.csproj index 9ab49a6..c1cd196 100644 --- a/src/Ben.Demystifier/Ben.Demystifier.csproj +++ b/src/Ben.Demystifier/Ben.Demystifier.csproj @@ -15,6 +15,8 @@ netstandard2.0;net45 + true + key.snk diff --git a/src/Ben.Demystifier/key.snk b/src/Ben.Demystifier/key.snk new file mode 100644 index 0000000000000000000000000000000000000000..9367ae1235592f0de556602b3b43822bffd34a3a GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa500971GDw~jd=22mhagDO4|>m;(Q>7k(ifEu zx{uq@`H!WnN01u_Z7bK>jYDp0U1E}HNdoC~g%rCCI~V4l;5ct0M0iKR#m$}rPkE^R z91;o=cwc{cVRRJcIAPBd*8Lp2LJ_!f0>-5*9wL@1Yts-xJU7Zj53Lldgd%Wt7yGW) zw2B$rg$xN< zNa3Di)V+Tq7~~4K8y0ux9n(P$9>3%7O%i|mO41s#j6bwu|9ogp$*zUq4`#g^#fe(% z7kMnj8aYrQ#>nJ(>G*TMVQELd)qK zEaOiC7E1Y>dEn72mbYiI4m+re3Lj{4OIb8n9>_yzBqm{VtE2`vl@{M*a4Whx3214- zhTkOFvWpH)@)Lo_pd&}>txF*>G=m*HI-D_Gl&CeDhxGX4q>TTYW__M>e9ksNkj;mJ zs29zdqT)pqt{$Kk%_Bjr0rk~;+QbYTs6mnD?r_?cWk-9oj5v+9CbPq1C(z{+ Date: Thu, 1 Feb 2018 20:27:22 -0500 Subject: [PATCH 3/3] Fix build --- appveyor.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 75a183e..9f08f22 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,5 @@ image: Visual Studio 2017 -shallow_clone: true - branches: only: - master @@ -22,7 +20,7 @@ nuget: disable_publish_on_pr: true build_script: -- ps: .\build.ps1 -target appveyor -buildAssemblyVersion ($env:BuildVersion + $env:APPVEYOR_BUILD_NUMBER) -buildSemanticVersion ($env:BuildSemanticVersion + $env:APPVEYOR_BUILD_NUMBER) +- ps: .\build.ps1 -target appveyor test: off @@ -31,4 +29,4 @@ deploy: off artifacts: - path: artifacts/build - path: artifacts/packages -- path: artifacts/test \ No newline at end of file +- path: artifacts/test