Skip to content

Merge develop to master #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions HttpClient.Caching/HttpClient.Caching.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;netstandard1.2;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net45;netstandard1.2;netstandard2.0;net5.0</TargetFrameworks>
<Authors>Thomas Galliker</Authors>
<Company>superdev GmbH</Company>
<Description>HttpClient.Caching adds http response caching to HttpClient.</Description>
<Copyright>Copyright 2020</Copyright>
<Copyright>Copyright 2021</Copyright>
<PackageProjectUrl>https://github.com/thomasgalliker/HttpClient.Caching</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/thomasgalliker/HttpClient.Caching/master/logo.png</PackageIconUrl>
<RepositoryUrl>https://github.com/thomasgalliker/HttpClient.Caching</RepositoryUrl>
Expand All @@ -18,7 +18,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="[11.0.2,)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
Expand Down
2 changes: 1 addition & 1 deletion Samples/WpfSample/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.5.0" newVersion="2.0.5.0" />
<bindingRedirect oldVersion="0.0.0.0-2.0.6.0" newVersion="2.0.6.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
8 changes: 4 additions & 4 deletions Samples/WpfSample/WpfSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CommonServiceLocator, Version=2.0.5.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\..\packages\CommonServiceLocator.2.0.5\lib\net47\CommonServiceLocator.dll</HintPath>
<Reference Include="CommonServiceLocator, Version=2.0.6.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\..\packages\CommonServiceLocator.2.0.6\lib\net47\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
Expand All @@ -47,8 +47,8 @@
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down
4 changes: 2 additions & 2 deletions Samples/WpfSample/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="2.0.5" targetFramework="net47" />
<package id="CommonServiceLocator" version="2.0.6" targetFramework="net47" />
<package id="MvvmLight" version="5.4.1.1" targetFramework="net47" />
<package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net47" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net47" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net47" />
<package id="Tracing" version="2.2.19302.1" targetFramework="net47" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net452</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<AssemblyName>HttpClient.Caching.Tests</AssemblyName>
<PackageId>HttpClient.Caching.Tests</PackageId>
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
Expand All @@ -11,9 +11,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="FluentAssertions" Version="6.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
Expand Down
68 changes: 42 additions & 26 deletions build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
####################################################################
# VSTS Build Configuration, Version 1.3
# VSTS Build Configuration, Version 1.4
#
# (c)2020 superdev GmbH
# (c)2021 superdev GmbH
####################################################################

name: 1.1.$(date:yy)$(DayOfYear).$(rev:rr)
name: $[format('{0}', variables['buildName'])]

pool:
vmImage: 'windows-2019'
Expand All @@ -14,32 +14,61 @@ trigger:
include:
- master
- develop
- release/*
- feature/*
- bugfix/*

paths:
exclude:
- README.md
- Images/*
- Samples/*

variables:
solution: 'HttpClient.Caching.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
buildVersionPostfix: '-pre'
majorVersion: 1
minorVersion: 2
patchVersion: $[counter(format('{0}.{1}', variables.majorVersion, variables.minorVersion), 0)]
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
# Versioning: 1.0.0
semVersion: $[format('{0}.{1}.{2}', variables.majorVersion, variables.minorVersion, variables.patchVersion)]
${{ if and(ne(variables['Build.SourceBranch'], 'refs/heads/master'), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))) }}:
# Versioning: 1.0.0-pre
semVersion: $[format('{0}.{1}.{2}-pre', variables.majorVersion, variables.minorVersion, variables.patchVersion)]
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
# Versioning: 1.0.0-pr.000000001
semVersion: $[format('{0}.{1}.{2}-pr.{3}', variables.majorVersion, variables.minorVersion, variables.patchVersion, variables['System.PullRequest.PullRequestId'])]
buildName: $[format('{0}', variables.semVersion)]

steps:
- task: bleddynrichards.Assembly-Info-Task.Assembly-Info-NetCore.Assembly-Info-NetCore@2
displayName: 'Set Assembly Manifest Data'
- task: Bash@3
displayName: 'Print all variables'
inputs:
targetType: 'inline'
script: 'env | sort'

- task: Assembly-Info-NetCore@2
displayName: 'Update Assembly Info'
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: |
HttpClient.Caching.csproj
**/*.csproj
InsertAttributes: true
FileEncoding: 'auto'
WriteBOM: false
Product: 'HttpClient.Caching'
Description: ''
Company: 'superdev GmbH'
Copyright: '(c) $(date:YYYY) superdev GmbH'
VersionNumber: '$(Build.BuildNumber)'
FileVersionNumber: '$(Build.BuildNumber)'
InformationalVersion: '$(Build.BuildNumber)'
PackageVersion: '$(Build.BuildNumber)'
LogLevel: 'verbose'
FailOnWarning: false
DisableTelemetry: false'


- task: NuGetToolInstaller@0
displayName: 'Use NuGet 5.x'
Expand All @@ -51,41 +80,28 @@ steps:
inputs:
restoreSolution: '$(solution)'

- powershell: |
Write-Host "##vso[task.setvariable variable=PackageVersion]$(Build.BuildNumber)"
Write-Host "##vso[task.setvariable variable=PackageVersionPre]$(Build.BuildNumber)$(BuildVersionPostfix)"
displayName: 'Set PackageVersion'

- task: VSBuild@1
displayName: 'Build solution'
inputs:
solution: '$(solution)'
msbuildArgs: ''
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'

- task: DotNetCoreCLI@2
displayName: 'Run UnitTests'
inputs:
command: test
projects: '**/*.Tests.csproj'
arguments: '--framework netcoreapp3.1'

- task: DotNetCoreCLI@2
displayName: 'Pack NuGet PreRelease'
inputs:
command: pack
packagesToPack: HttpClient.Caching/HttpClient.Caching.csproj
versioningScheme: byEnvVar
versionEnvVar: PackageVersionPre

arguments: '--no-restore --no-build --configuration $(buildConfiguration)'

- task: DotNetCoreCLI@2
displayName: 'Pack NuGet Prod'
displayName: 'Pack HttpClient.Caching'
inputs:
command: pack
packagesToPack: HttpClient.Caching/HttpClient.Caching.csproj
versioningScheme: byEnvVar
versionEnvVar: PackageVersion
versionEnvVar: semVersion

- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
Expand Down