Skip to content

Commit

Permalink
Add version and package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Oren Novotny committed Jun 2, 2017
1 parent d1c16f3 commit d5c0163
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 68 deletions.
40 changes: 40 additions & 0 deletions Directory.build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<Project>

<PropertyGroup>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<MinClientVersion>2.12</MinClientVersion>
<GenerateDocumentationFile Condition=" '$(Configuration)' == 'Release' ">true</GenerateDocumentationFile>
<Authors>Paul Betts,Refit contributors</Authors>
<PackageProjectUrl>https://github.com/paulcbetts/refit</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/paulcbetts/refit/blob/master/COPYING</PackageLicenseUrl>
<DefaultLanguage>en-US</DefaultLanguage>
<IncludeSymbols>false</IncludeSymbols>
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
<Description>The automatic type-safe REST library for Xamarin and .NET</Description>
</PropertyGroup>

<ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(NCrunch)' == '' and '$(SourceLinkEnabled)' != 'false'">
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.1.0" PrivateAssets="All" />
</ItemGroup>

<!-- Workaround -->
<Target Name="GetPackagingOutputs" />

<PropertyGroup>
<NerdbankGitVersioningVersion>2.0.4-beta</NerdbankGitVersioningVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.0.4-beta" PrivateAssets="all" />
</ItemGroup>

<!-- https://github.com/NuGet/Home/issues/4337 -->
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' == 'true' ">
<Import Project="$(UserProfile)\.nuget\packages\nerdbank.gitversioning\$(NerdbankGitVersioningVersion)\buildCrossTargeting\Nerdbank.GitVersioning.targets"
Condition="Exists('$(UserProfile)\.nuget\packages\nerdbank.gitversioning\$(NerdbankGitVersioningVersion)\buildCrossTargeting\Nerdbank.GitVersioning.targets')" />
</ImportGroup>
<Target Name="FixUpVersion"
BeforeTargets="_GenerateRestoreProjectSpec"
DependsOnTargets="GetBuildVersion"
Condition=" '$(NerdbankGitVersioningTasksPath)' != '' " />
</Project>
56 changes: 0 additions & 56 deletions GitVersion.yml

This file was deleted.

1 change: 1 addition & 0 deletions Refit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4F1C8991-7097-4471-A9A6-A72005AB594D}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.build.props = Directory.build.props
Refit\refit.nuspec = Refit\refit.nuspec
Refit\targets\refit.targets = Refit\targets\refit.targets
EndProjectSection
Expand Down
26 changes: 14 additions & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
configuration: Release

init:
- cmd: set

image: Visual Studio 2017
configuration: Release
install:
- cmd: appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/v3.5.0-beta2/NuGet.exe
- cmd: nuget install GitVersion.CommandLine -SolutionDir %APPVEYOR_BUILD_FOLDER% -Verbosity quiet -ExcludeVersion -pre
- cmd: nuget install gitlink -SolutionDir %APPVEYOR_BUILD_FOLDER% -Verbosity quiet -ExcludeVersion -pre
- cmd: appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/v4.1.0/NuGet.exe

init:
- git config --global core.autocrlf input

before_build:
- cmd: nuget restore Refit.sln
- cmd: '.\packages\GitVersion.CommandLine\tools\GitVersion.exe /l console /output buildserver /updateAssemblyInfo'
- cmd: msbuild /t:restore Refit.sln

build:
verbosity: normal
parallel: true
project: Refit.sln

after_build:
- cmd: nuget pack Refit\Refit.nuspec -version "%GitVersion_NuGetVersionV2%" -prop "target=%CONFIGURATION%" -NoPackageAnalysis
- cmd: appveyor PushArtifact "Refit.%GitVersion_NuGetVersion%.nupkg"
- ps: |
$vers = & $env:UserProfile\.nuget\packages\nerdbank.gitversioning\2.0.4-beta\tools\Get-Version.ps1
$env:NuGetPackageVersion = $vers.NuGetPackageVersion
- cmd: nuget pack Refit\Refit.nuspec -version "%NuGetPackageVersion%" -prop "target=%CONFIGURATION%" -NoPackageAnalysis
- cmd: appveyor PushArtifact "Refit.%NuGetPackageVersion%.nupkg"

deploy:
provider: NuGet
server: https://www.myget.org/F/refit/api/v2/package
on:
branch: master
api_key:
secure: bmqlJK8a5HYiUXOT99HXT1j7JiM5+fpR4kHhxIC30oaaEXbv94f0fKdiKlU1QC/l
artifact: /.*\.nupkg/
12 changes: 12 additions & 0 deletions version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "3.1.0-preview.{height}",
"publicReleaseRefSpec": [
"^refs/heads/master$", // we release out of master
"^refs/tags/v\\d+\\.\\d+" // we also release tags starting with vN.N
],
"cloudBuild": {
"buildNumber": {
"enabled": true
}
}
}

0 comments on commit d5c0163

Please sign in to comment.