diff --git a/ImageProcessorCore.sln b/ImageProcessorCore.sln index 898468eb5..9d828a74a 100644 --- a/ImageProcessorCore.sln +++ b/ImageProcessorCore.sln @@ -9,6 +9,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ImageProcessorCore.Tests", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}" ProjectSection(SolutionItems) = preProject + appveyor.yml = appveyor.yml + build\dotnet-latest.ps1 = build\dotnet-latest.ps1 global.json = global.json README.md = README.md EndProjectSection diff --git a/appveyor.yml b/appveyor.yml index 3862ed678..15b1df6dc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ os: Visual Studio 2015 init: - cmd: >- - choco install dotnetcli +- ps: .\build\dotnet-latest.ps1 set PATH=C:\Program Files\dotnet\bin;%PATH% assembly_info: @@ -33,13 +33,13 @@ test: off artifacts: - path: artifacts\bin\ImageProcessorCore\**\*.nupkg -# deploy: -# # MyGet Deployment for builds & releases -# - provider: NuGet -# server: https://www.myget.org/F/imageprocessor/api/v2/package -# symbol_server: https://nuget.symbolsource.org/MyGet/imageprocessor -# api_key: -# secure: fz0rUrt3B1HczUC1ZehwVsrFSWX9WZGDQoueDztLte9/+yQG+BBU7UrO+coE8lUf -# artifact: /.*\.nupkg/ -# on: -# branch: Core \ No newline at end of file +deploy: + # MyGet Deployment for builds & releases + - provider: NuGet + server: https://www.myget.org/F/imageprocessor/api/v2/package + symbol_server: https://nuget.symbolsource.org/MyGet/imageprocessor + api_key: + secure: fz0rUrt3B1HczUC1ZehwVsrFSWX9WZGDQoueDztLte9/+yQG+BBU7UrO+coE8lUf + artifact: /.*\.nupkg/ + on: + branch: Core \ No newline at end of file diff --git a/dotnet-latest.ps1 b/dotnet-latest.ps1 new file mode 100644 index 000000000..8ce43e746 --- /dev/null +++ b/dotnet-latest.ps1 @@ -0,0 +1,29 @@ +# Set up everything for using the dotnet cli. This means we do not have to wait for Appveyor images to be updated. + +# Clean and recreate the folder in which all output packages should be placed +$ArtifactsPath = "artifacts" + +if (Test-Path $ArtifactsPath) { + Remove-Item -Path $ArtifactsPath -Recurse -Force -ErrorAction Ignore +} + +New-Item $ArtifactsPath -ItemType Directory -ErrorAction Ignore | Out-Null + +Write-Host "Created artifacts folder '$ArtifactsPath'" + +# Install the latest dotnet cli +if (Get-Command "dotnet.exe" -ErrorAction SilentlyContinue) { + Write-Host "dotnet SDK already installed" + dotnet --version +} else { + Write-Host "Installing dotnet SDK" + + $installScript = Join-Path $ArtifactsPath "dotnet-install.ps1" + + Write-Host $installScript + + Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1" ` + -OutFile $installScript + + & $installScript +}