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

Commit 51fa364

Browse files
author
N. Taylor Mullen
committed
Update nuget.exe and corresponding feeds to v3.
1 parent 8b3f1ec commit 51fa364

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetlitedev/api/v2" />
4+
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
55
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
66
</packageSources>
77
</configuration>

build.cmd

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
cd %~dp0
33

44
SETLOCAL
5-
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
5+
SET NUGET_VERSION=latest
6+
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
67
SET BUILDCMD_KOREBUILD_VERSION=""
78
SET BUILDCMD_DNX_VERSION=""
89

910
IF EXIST %CACHED_NUGET% goto copynuget
1011
echo Downloading latest version of NuGet.exe...
1112
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
12-
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"
13+
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
1314

1415
:copynuget
1516
IF EXIST .nuget\nuget.exe goto restore
@@ -19,11 +20,11 @@ copy %CACHED_NUGET% .nuget\nuget.exe > nul
1920
:restore
2021
IF EXIST packages\KoreBuild goto run
2122
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
22-
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
23+
.nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
2324
) ELSE (
24-
.nuget\NuGet.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
25+
.nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
2526
)
26-
.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
27+
.nuget\nuget.exe install Sake -ExcludeVersion -Out packages
2728

2829
IF "%SKIP_DNX_INSTALL%"=="1" goto run
2930
IF %BUILDCMD_DNX_VERSION%=="" (

build.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@ else
1010
fi
1111
fi
1212
mkdir -p $cachedir
13+
nugetVersion=latest
14+
cachePath=$cachedir/nuget.$nugetVersion.exe
1315

14-
url=https://www.nuget.org/nuget.exe
16+
url=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe
1517

16-
if test ! -f $cachedir/nuget.exe; then
17-
wget -O $cachedir/nuget.exe $url 2>/dev/null || curl -o $cachedir/nuget.exe --location $url /dev/null
18+
if test ! -f $cachePath; then
19+
wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null
1820
fi
1921

2022
if test ! -e .nuget; then
2123
mkdir .nuget
22-
cp $cachedir/nuget.exe .nuget/nuget.exe
24+
cp $cachePath .nuget/nuget.exe
2325
fi
2426

2527
if test ! -d packages/KoreBuild; then
2628
mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
27-
mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
29+
mono .nuget/nuget.exe install Sake -ExcludeVersion -Out packages
2830
fi
2931

3032
if ! type dnvm > /dev/null 2>&1; then

0 commit comments

Comments
 (0)