-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.cmd
52 lines (43 loc) · 1.91 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
echo off
SET BUILDCMD_RELEASE=rc1-final
SET DNX_BUILD_VERSION=%BUILDCMD_RELEASE%-build%APPVEYOR_BUILD_NUMBER%
cd %~dp0
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"
:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul
:restore
.nuget\NuGet.exe sources add -Name aspnetrelease -Source https://www.myget.org/f/aspnetmaster/api/v3/index.json
.nuget\NuGet.exe sources
rem .nuget\NuGet.exe
IF EXIST packages\KoreBuild goto sake
IF DEFINED BUILDCMD_RELEASE (
.nuget\NuGet.exe install KoreBuild -version 0.2.1-%BUILDCMD_RELEASE% -ExcludeVersion -o packages -nocache -pre
) ELSE (
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
)
:sake
IF EXIST packages\Sake goto dnvm
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion
:dnvm
IF EXIST %USERPROFILE%\.dnx\runtimes\dnx-clr-win-x86.1.0.0-%BUILDCMD_RELEASE% goto coreInstall
IF DEFINED BUILDCMD_RELEASE (
CALL packages\KoreBuild\build\dnvm install 1.0.0-%BUILDCMD_RELEASE% -runtime CLR -arch x86 -alias default
) ELSE (
CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
)
:coreInstall
IF EXIST %USERPROFILE%\.dnx\runtimes\dnx-CoreCLR-win-x86.1.0.0-%BUILDCMD_RELEASE% goto use
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86
:use
echo ;%PATH%; | find /C /I "dnx-clr-win-x86.1.0.0-%BUILDCMD_RELEASE%" >nul
if %ERRORLEVEL% EQU 0 goto build
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
:build
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -v -f makefile.shade %*
echo END BUILD SCRIPT!!!