-
-
Notifications
You must be signed in to change notification settings - Fork 16
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 #6 from kappy/build-appveyour
Build appveyour
- Loading branch information
Showing
11 changed files
with
7,814 additions
and
1,810 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#:C:\JMS\Repository\FlatMapper\src\FlatMapper\FlatMapper.xproj | ||
#:C:\JMS\Repository\FlatMapper\tests\FlatMapper.Tests\FlatMapper.Tests.xproj | ||
C:\JMS\Repository\FlatMapper\tests\FlatMapper.Tests\FlatMapper.Tests.xproj|C:\JMS\Repository\FlatMapper\src\FlatMapper\FlatMapper.xproj |
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<# | ||
.SYNOPSIS | ||
You can add this to you build script to ensure that psbuild is available before calling | ||
Invoke-MSBuild. If psbuild is not available locally it will be downloaded automatically. | ||
#> | ||
function EnsurePsbuildInstalled{ | ||
[cmdletbinding()] | ||
param( | ||
[string]$psbuildInstallUri = 'https://raw.githubusercontent.com/ligershark/psbuild/master/src/GetPSBuild.ps1' | ||
) | ||
process{ | ||
if(-not (Get-Command "Invoke-MsBuild" -errorAction SilentlyContinue)){ | ||
'Installing psbuild from [{0}]' -f $psbuildInstallUri | Write-Verbose | ||
(new-object Net.WebClient).DownloadString($psbuildInstallUri) | iex | ||
} | ||
else{ | ||
'psbuild already loaded, skipping download' | Write-Verbose | ||
} | ||
|
||
# make sure it's loaded and throw if not | ||
if(-not (Get-Command "Invoke-MsBuild" -errorAction SilentlyContinue)){ | ||
throw ('Unable to install/load psbuild from [{0}]' -f $psbuildInstallUri) | ||
} | ||
} | ||
} | ||
|
||
# Taken from psake https://github.com/psake/psake | ||
|
||
<# | ||
.SYNOPSIS | ||
This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode | ||
to see if an error occcured. If an error is detected then an exception is thrown. | ||
This function allows you to run command-line programs without having to | ||
explicitly check the $lastexitcode variable. | ||
.EXAMPLE | ||
exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed" | ||
#> | ||
function Exec | ||
{ | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Position=0,Mandatory=1)][scriptblock]$cmd, | ||
[Parameter(Position=1,Mandatory=0)][string]$errorMessage = ($msgs.error_bad_command -f $cmd) | ||
) | ||
& $cmd | ||
if ($lastexitcode -ne 0) { | ||
throw ("Exec: " + $errorMessage) | ||
} | ||
} | ||
|
||
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse } | ||
|
||
EnsurePsbuildInstalled | ||
|
||
exec { & dotnet restore } | ||
|
||
Invoke-MSBuild | ||
|
||
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; | ||
$revision = "{0:D4}" -f [convert]::ToInt32($revision, 10) | ||
|
||
exec { & dotnet test .\tests\FlatMapper.Tests -c Release } | ||
|
||
exec { & dotnet pack .\src\FlatMapper -c Release -o .\artifacts --version-suffix=$revision } | ||
|
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,29 +1,23 @@ | ||
version: 0.7.0-{build} | ||
os: Visual Studio 2015 | ||
install: | ||
- cmd: set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH% | ||
- cmd: dnvm install 1.0.0-rc1-update1 | ||
- cmd: dnu restore | ||
- cmd: IF DEFINED APPVEYOR_BUILD_NUMBER SET DNX_BUILD_VERSION=%APPVEYOR_BUILD_NUMBER% | ||
version: '{build}' | ||
pull_requests: | ||
do_not_increment_build_number: true | ||
branches: | ||
only: | ||
- master | ||
configuration: Release | ||
assembly_info: | ||
patch: true | ||
file: '**\AssemblyInfo.*' | ||
assembly_version: '{version}' | ||
assembly_file_version: '{version}' | ||
assembly_informational_version: '{version}' | ||
build: | ||
publish_nuget: true | ||
publish_nuget_symbols: false | ||
include_nuget_references: true | ||
verbosity: minimal | ||
test_script: | ||
- cmd: dnx -p .\tests\FlatMapper.Tests test | ||
build_script: | ||
- ps: .\Build.ps1 | ||
test: off | ||
nuget: | ||
disable_publish_on_pr: true | ||
artifacts: | ||
- path: artifacts\bin\FlatMapper\$(configuration)\*.nupkg | ||
- path: artifacts\**\*.nupkg | ||
name: NuGet | ||
deploy: | ||
provider: NuGet | ||
skip_symbols: true | ||
- provider: NuGet | ||
name: production | ||
api_key: | ||
secure: c18PmLObjM4XzNKNj8/LzYty11gya98+IerJXipzMmL9wgmHS6cGAJWYpJkDxmU2 | ||
artifact: /.*\.nupkg/ | ||
on: | ||
branch: master | ||
appveyor_repo_tag: true |
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,6 +1,6 @@ | ||
{ | ||
"projects": [ "src", "test" ], | ||
"sdk": { | ||
"version": "1.0.0-rc1-update1" | ||
"version": "1.0.0-preview2-003121" | ||
} | ||
} |
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
Oops, something went wrong.