Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit 8874b64

Browse files
committed
Enable pinning build script
1 parent 28d7543 commit 8874b64

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

build.cmd

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ cd %~dp0
33

44
SETLOCAL
55
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
6+
SET BUILDCMD_KOREBUILD_VERSION=""
7+
SET BUILDCMD_DNX_VERSION=""
68

79
IF EXIST %CACHED_NUGET% goto copynuget
810
echo Downloading latest version of NuGet.exe...
@@ -16,13 +18,21 @@ copy %CACHED_NUGET% .nuget\nuget.exe > nul
1618

1719
:restore
1820
IF EXIST packages\KoreBuild goto run
19-
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
21+
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
22+
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
23+
) ELSE (
24+
.nuget\NuGet.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
25+
)
2026
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion
2127

2228
IF "%SKIP_DNX_INSTALL%"=="1" goto run
23-
CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
29+
IF %BUILDCMD_DNX_VERSION%=="" (
30+
CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
31+
) ELSE (
32+
CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -a default
33+
)
2434
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86
2535

2636
:run
2737
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
28-
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*
38+
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

0 commit comments

Comments
 (0)