forked from autofac/Autofac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cmd
60 lines (44 loc) · 1.65 KB
/
build.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@ECHO OFF
PUSHD %~dp0
:dnvminstall
SETLOCAL EnableDelayedExpansion
where dnvm
IF %ERRORLEVEL% neq 0 (
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
SET PATH=!PATH!;!userprofile!\.dnx\bin
SET DNX_HOME=!USERPROFILE!\.dnx
GOTO install
)
:install
CALL dnvm install 1.0.0-beta4 -r CoreCLR
CALL dnvm install 1.0.0-beta4 -r CLR
CALL dnvm use 1.0.0-beta4 -r CLR
:restore
CALL dnu restore src\Autofac
IF %errorlevel% neq 0 EXIT /b %errorlevel%
CALL dnu restore src\Autofac.Dnx
IF %errorlevel% neq 0 EXIT /b %errorlevel%
CALL dnu restore test\Autofac.Test
IF %errorlevel% neq 0 EXIT /b %errorlevel%
CALL dnu restore test\Autofac.Dnx.Test
IF %errorlevel% neq 0 EXIT /b %errorlevel%
:pack
SETLOCAL ENABLEEXTENSIONS
IF ERRORLEVEL 1 ECHO Unable to enable extensions
IF DEFINED APPVEYOR_BUILD_NUMBER (SET DNX_BUILD_VERSION=%APPVEYOR_BUILD_NUMBER%) ELSE (SET DNX_BUILD_VERSION=1)
ECHO DNX_BUILD_VERSION=%DNX_BUILD_VERSION%
CALL dnu pack src\Autofac --configuration Release --out artifacts\packages
IF %errorlevel% neq 0 EXIT /b %errorlevel%
CALL dnu pack src\Autofac.Dnx --configuration Release --out artifacts\packages
IF %errorlevel% neq 0 EXIT /b %errorlevel%
:test
CALL dnx test\Autofac.Test test
IF %errorlevel% neq 0 EXIT /b %errorlevel%
CALL dnx test\Autofac.Dnx.Test test
IF %errorlevel% neq 0 EXIT /b %errorlevel%
CALL dnvm use 1.0.0-beta4 -r CoreCLR
CALL dnx test\Autofac.Test test
IF %errorlevel% neq 0 EXIT /b %errorlevel%
CALL dnx test\Autofac.Dnx.Test test
IF %errorlevel% neq 0 EXIT /b %errorlevel%
POPD