Skip to content

Commit

Permalink
build 설정 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
gongdo committed Aug 3, 2016
1 parent b8724d2 commit ae45e37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pull_requests:
branches:
only:
- master
- dev
skip_commits:
message: /(Created.*\.(png|jpg|jpeg|bmp|gif))|(README.md)/
nuget:
Expand All @@ -21,7 +22,7 @@ deploy:
secure: X8/Cm8f2M7FVtOuQftWgMlQv8XNMXJ8RbtVkeQkTgoaLb5Bv6Vf5KWcYZSEJ/wIc
skip_symbols: true
on:
branch: master
branch: dev
- provider: NuGet
name: production
api_key:
Expand Down
10 changes: 7 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ function Exec

# keep current directory
$buildDirectory = Get-Location
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = "dev" }[$env:APPVEYOR_REPO_BRANCH -eq "master"];

Write-Host "clean artifacts folder"
if(Test-Path ./artifacts) { Remove-Item ./artifacts -Force -Recurse }
Expand All @@ -34,12 +36,14 @@ exec { & dotnet restore }
Write-Host "build them all"
exec { & dotnet build ./**/project.json }

$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];

Write-Host "test"
exec { & cd ./test/Iamport.RestApi.Tests }
exec { & dotnet test -c Release }
Set-Location $buildDirectory

Write-Host "pack nuget"
exec { & dotnet pack ./src/Iamport.RestApi -c Release -o ./artifacts --version-suffix preview1-$revision }
if ("master" -eq $branch) {
exec { & dotnet pack ./src/Iamport.RestApi -c Release -o ./artifacts }
} else {
exec { & dotnet pack ./src/Iamport.RestApi -c Release -o ./artifacts --version-suffix $revision }
}

0 comments on commit ae45e37

Please sign in to comment.