React to aspnet/Universe#290 fix
- pick up latest `build.cmd` and `build.sh` files - preserve lack of DNX installations when building this repo - change case of `NuGet.config` filename - was ignored on Linux - also move to v3 feeds, consistent with other repos - go back to Mono Beta feed (version 4.0.4) in Travis builds - avoid frequent `mono .nuget/nuget.exe` failures
This commit is contained in:
Родитель
8aa7b4d4c5
Коммит
eac22fa9f3
|
@ -1,5 +1,7 @@
|
|||
language: csharp
|
||||
sudo: false
|
||||
mono:
|
||||
- beta
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/" />
|
||||
<add key="NuGet.org" value="https://nuget.org/api/v2/" />
|
||||
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
|
||||
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
17
build.cmd
17
build.cmd
|
@ -2,12 +2,15 @@
|
|||
cd %~dp0
|
||||
|
||||
SETLOCAL
|
||||
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
|
||||
SET NUGET_VERSION=latest
|
||||
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
|
||||
SET BUILDCMD_KOREBUILD_VERSION=""
|
||||
SET BUILDCMD_DNX_VERSION=""
|
||||
|
||||
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%'"
|
||||
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
|
||||
|
||||
:copynuget
|
||||
IF EXIST .nuget\nuget.exe goto restore
|
||||
|
@ -15,9 +18,13 @@ md .nuget
|
|||
copy %CACHED_NUGET% .nuget\nuget.exe > nul
|
||||
|
||||
:restore
|
||||
IF EXIST packages\KoreBuild goto run
|
||||
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
|
||||
IF EXIST packages\Sake goto run
|
||||
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
|
||||
.nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
|
||||
) ELSE (
|
||||
.nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
|
||||
)
|
||||
.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
|
||||
|
||||
:run
|
||||
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -I build -f makefile.shade %*
|
||||
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -I build -f makefile.shade %*
|
||||
|
|
14
build.sh
14
build.sh
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if test `uname` = Darwin; then
|
||||
cachedir=~/Library/Caches/KBuild
|
||||
|
@ -10,19 +10,21 @@ else
|
|||
fi
|
||||
fi
|
||||
mkdir -p $cachedir
|
||||
nugetVersion=latest
|
||||
cachePath=$cachedir/nuget.$nugetVersion.exe
|
||||
|
||||
url=https://www.nuget.org/nuget.exe
|
||||
url=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe
|
||||
|
||||
if test ! -f $cachedir/nuget.exe; then
|
||||
wget -O $cachedir/nuget.exe $url 2>/dev/null || curl -o $cachedir/nuget.exe --location $url /dev/null
|
||||
if test ! -f $cachePath; then
|
||||
wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null
|
||||
fi
|
||||
|
||||
if test ! -e .nuget; then
|
||||
mkdir .nuget
|
||||
cp $cachedir/nuget.exe .nuget/nuget.exe
|
||||
cp $cachePath .nuget/nuget.exe
|
||||
fi
|
||||
|
||||
if test ! -d packages/KoreBuild; then
|
||||
if test ! -d packages/Sake; then
|
||||
mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
|
||||
mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
|
||||
fi
|
||||
|
|
|
@ -52,15 +52,16 @@ default DNVM_DEPLOY_BRANCH="${Environment.GetEnvironmentVariable("DNVM_DEPLOY_BR
|
|||
|
||||
#run-ps1-tests target='test' if='!IsLinux'
|
||||
exec program='powershell' commandline='-ExecutionPolicy RemoteSigned -NoProfile -NoLogo -Command & "${Path.Combine(TEST_DIR, "ps1", "Run-Tests.ps1")} ${IsTeamCity?"-TeamCity":""}'
|
||||
|
||||
|
||||
#run-sh-tests target='test' if='IsLinux'
|
||||
exec program='/bin/bash' commandline="${Path.Combine(TEST_DIR, "sh", "run-tests.sh")} ${IsTeamCity?"-t ":""}-v" workingdir="${Path.Combine(TEST_DIR, "sh")}"
|
||||
|
||||
#push-dnvm target='deploy' if='DEPLOY_DNVM == "1" && !String.IsNullOrEmpty(DNVM_DEPLOY_REPO) && !String.IsNullOrEmpty(DNVM_DEPLOY_BRANCH)'
|
||||
push-dnvm repo="${DNVM_DEPLOY_REPO}" branch="${DNVM_DEPLOY_BRANCH}" files="${Path.Combine(TARGET_DIR, "dnvm.cmd")};${Path.Combine(TARGET_DIR, "dnvm.ps1")};${Path.Combine(TARGET_DIR, "dnvm.sh")}" baseMessage=":arrow_up: dnvm.ps1, dnvm.cmd, dnvm.sh"
|
||||
push-dnvm repo="${DNVM_DEPLOY_REPO}" branch="${DNVM_DEPLOY_BRANCH}" files="${Path.Combine(TARGET_DIR, "dnvm.cmd")};${Path.Combine(TARGET_DIR, "dnvm.ps1")};${Path.Combine(TARGET_DIR, "dnvm.sh")}" baseMessage=":arrow_up: dnvm.ps1, dnvm.cmd, dnvm.sh"
|
||||
|
||||
functions @{
|
||||
private static bool Quiet { get; set; }
|
||||
|
||||
string GetEnvironmentVariable(string key) { return Environment.GetEnvironmentVariable(key); }
|
||||
void SetEnvironmentVariable(string key, string value) { Environment.SetEnvironmentVariable(key, value); }
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче