This commit is contained in:
Scott Williams 2017-01-16 18:44:39 +00:00
Родитель e169294016
Коммит e652dec1c2
5 изменённых файлов: 72 добавлений и 0 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -21,6 +21,7 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/
artifacts/
# Visual Studio 2015 cache/options directory
.vs/

21
appveyor.yml Normal file
Просмотреть файл

@ -0,0 +1,21 @@
version: 0.0.{build}
install:
- choco install gitversion.portable -pre -y
before_build:
- ps: gitversion /l console /output buildserver /updateAssemblyInfo
build_script:
- cmd: build.cmd
after_build:
- cmd: appveyor PushArtifact "artifacts\Shaper2D.%GitVersion_NuGetVersion%.nupkg"
deploy:
- provider: NuGet
server: https://www.myget.org/F/shaper2d/api/v2/package
api_key:
secure: SyrSERGrjkK21TSCsHtqke5279SMxXCg2NXKjR2qaErP0khEplwxPwE8Ch5bxzyf
test: off

34
build.cmd Normal file
Просмотреть файл

@ -0,0 +1,34 @@
@echo Off
REM No glob support on Windows
dotnet restore
dotnet test ./tests/Shaper2D.Tests/
REM run only if gitversion has ran i.e. from appveyor
if not "%GitVersion_NuGetVersion%" == "" (
cd src/Shaper2D
ECHO Setting version number to "%GitVersion_NuGetVersion%"
dotnet version "%GitVersion_NuGetVersion%"
cd ../../
if not "%errorlevel%"=="0" goto failure
)
ECHO Building nuget packages
if not "%GitVersion_NuGetVersion%" == "" (
dotnet pack -c Release --output ./artifacts ./src/Shaper2D/project.json
)ELSE (
dotnet pack -c Release --version-suffix "local-build" --output ./artifacts ./src/Shaper2D/project.json
)
if not "%errorlevel%"=="0" goto failure
:success
ECHO successfully built project
REM exit 0
goto end
:failure
ECHO failed to build.
REM exit -1
goto end
:end

13
gitversion.yml Normal file
Просмотреть файл

@ -0,0 +1,13 @@
# to create a new package you create a new release/tag
# in github appveyor will build it without the -cixxx tag
# it will then be deployable cleanly to nuget.org
branches:
master:
tag: ci
mode: ContinuousDeployment
increment: Minor
prevent-increment-of-merged-branch-version: false
track-merge-target: true
ignore:
sha: []

Просмотреть файл

@ -69,5 +69,8 @@
"System.Runtime": "4.0.0"
}
}
},
"tools": {
"dotnet-version": "1.1.0"
}
}