This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from henkmollema/sdk-2.0
Update to .NET Core SDK 2.0
- Loading branch information
Showing
11 changed files
with
24 additions
and
146 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,2 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries) | ||
{ | ||
while($true) | ||
{ | ||
try | ||
{ | ||
Invoke-WebRequest $url -OutFile $downloadLocation | ||
break | ||
} | ||
catch | ||
{ | ||
$exceptionMessage = $_.Exception.Message | ||
Write-Host "Failed to download '$url': $exceptionMessage" | ||
if ($retries -gt 0) { | ||
$retries-- | ||
Write-Host "Waiting 10 seconds before retrying. Retries left: $retries" | ||
Start-Sleep -Seconds 10 | ||
|
||
} | ||
else | ||
{ | ||
$exception = $_.Exception | ||
throw $exception | ||
} | ||
} | ||
} | ||
} | ||
|
||
cd $PSScriptRoot | ||
|
||
$repoFolder = $PSScriptRoot | ||
$env:REPO_FOLDER = $repoFolder | ||
|
||
$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/8fbf3a9151eb555cedbfe8be8df9082a64c2fecb.zip" | ||
if ($env:KOREBUILD_ZIP) | ||
{ | ||
$koreBuildZip=$env:KOREBUILD_ZIP | ||
} | ||
|
||
$buildFolder = ".build" | ||
$buildFile="$buildFolder\KoreBuild.ps1" | ||
|
||
if (!(Test-Path $buildFolder)) { | ||
Write-Host "Downloading KoreBuild from $koreBuildZip" | ||
|
||
$tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid() | ||
New-Item -Path "$tempFolder" -Type directory | Out-Null | ||
|
||
$localZipFile="$tempFolder\korebuild.zip" | ||
|
||
DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6 | ||
|
||
Add-Type -AssemblyName System.IO.Compression.FileSystem | ||
[System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder) | ||
|
||
New-Item -Path "$buildFolder" -Type directory | Out-Null | ||
copy-item "$tempFolder\**\build\*" $buildFolder -Recurse | ||
|
||
# Cleanup | ||
if (Test-Path $tempFolder) { | ||
Remove-Item -Recurse -Force $tempFolder | ||
} | ||
} | ||
|
||
&"$buildFile" @args | ||
dotnet build | ||
dotnet test .\test\Dapper.FluentMap.Tests\Dapper.FluentMap.Tests.csproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,4 @@ | ||
#!/usr/bin/env bash | ||
repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
cd $repoFolder | ||
|
||
koreBuildZip="https://github.com/aspnet/KoreBuild/archive/8fbf3a9151eb555cedbfe8be8df9082a64c2fecb.zip" | ||
if [ ! -z $KOREBUILD_ZIP ]; then | ||
koreBuildZip=$KOREBUILD_ZIP | ||
fi | ||
|
||
buildFolder=".build" | ||
buildFile="$buildFolder/KoreBuild.sh" | ||
|
||
if test ! -d $buildFolder; then | ||
echo "Downloading KoreBuild from $koreBuildZip" | ||
|
||
tempFolder="/tmp/KoreBuild-$(uuidgen)" | ||
mkdir $tempFolder | ||
|
||
localZipFile="$tempFolder/korebuild.zip" | ||
|
||
retries=6 | ||
until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null) | ||
do | ||
echo "Failed to download '$koreBuildZip'" | ||
if [ "$retries" -le 0 ]; then | ||
exit 1 | ||
fi | ||
retries=$((retries - 1)) | ||
echo "Waiting 10 seconds before retrying. Retries left: $retries" | ||
sleep 10s | ||
done | ||
|
||
unzip -q -d $tempFolder $localZipFile | ||
|
||
mkdir $buildFolder | ||
cp -r $tempFolder/**/build/** $buildFolder | ||
|
||
chmod +x $buildFile | ||
|
||
# Cleanup | ||
if test -d $tempFolder; then | ||
rm -rf $tempFolder | ||
fi | ||
fi | ||
|
||
$buildFile -r $repoFolder "$@" | ||
dotnet restore | ||
dotnet build ./src/Dapper.FluentMap/Dapper.FluentMap.csproj -f netstandard1.3 | ||
dotnet build ./src/Dapper.FluentMap.Dommel/Dapper.FluentMap.Dommel.csproj -f netstandard1.3 | ||
dotnet test ./test/Dapper.FluentMap.Tests/Dapper.FluentMap.Tests.csproj |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Description>Dapper.FluentMap extension for Dommel support.</Description> | ||
<Copyright>Copyright © Henk Mollema 2017</Copyright> | ||
<VersionPrefix>1.4.5</VersionPrefix> | ||
<VersionPrefix>1.5.0</VersionPrefix> | ||
<Authors>Henk Mollema</Authors> | ||
<TargetFrameworks>net45;net451;netstandard1.3</TargetFrameworks> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<PackageTags>dapper;fluentmap;dommel</PackageTags> | ||
<PackageProjectUrl>https://github.com/henkmollema/Dapper-FluentMap</PackageProjectUrl> | ||
<PackageLicenseUrl>https://github.com/henkmollema/Dapper-FluentMap/blob/master/LICENSE</PackageLicenseUrl> | ||
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.3' ">1.6.0</NetStandardImplicitPackageVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Dapper.FluentMap\Dapper.FluentMap.csproj" /> | ||
<PackageReference Include="Dommel" Version="1.8.0" /> | ||
<PackageReference Include="Dommel" Version="1.9.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>netcoreapp1.1</TargetFramework> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Dapper.FluentMap\Dapper.FluentMap.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" /> | ||
<PackageReference Include="xunit" Version="2.2.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta4-*" /> | ||
<PackageReference Include="xunit" Version="2.3.0-beta4-*" /> | ||
|
||
<!-- | ||
Temporary workaround until fix is embbeded in a future xUnit package | ||
https://github.com/xunit/xunit/issues/1406 | ||
--> | ||
<PackageReference Include="xunit.analyzers" Version="0.6.1" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters