- 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:
Doug Bunting 2015-10-10 20:57:20 -07:00
Родитель 8aa7b4d4c5
Коммит eac22fa9f3
5 изменённых файлов: 27 добавлений и 15 удалений

Просмотреть файл

@ -1,5 +1,7 @@
language: csharp language: csharp
sudo: false sudo: false
mono:
- beta
addons: addons:
apt: apt:
packages: packages:

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/" /> <add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
<add key="NuGet.org" value="https://nuget.org/api/v2/" /> <add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources> </packageSources>
</configuration> </configuration>

Просмотреть файл

@ -2,12 +2,15 @@
cd %~dp0 cd %~dp0
SETLOCAL 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 IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe... echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet 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 :copynuget
IF EXIST .nuget\nuget.exe goto restore IF EXIST .nuget\nuget.exe goto restore
@ -15,9 +18,13 @@ md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul copy %CACHED_NUGET% .nuget\nuget.exe > nul
:restore :restore
IF EXIST packages\KoreBuild goto run IF EXIST packages\Sake goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre 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 .nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
:run :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 %*

Просмотреть файл

@ -1,4 +1,4 @@
#!/usr/bin/env sh #!/usr/bin/env bash
if test `uname` = Darwin; then if test `uname` = Darwin; then
cachedir=~/Library/Caches/KBuild cachedir=~/Library/Caches/KBuild
@ -10,19 +10,21 @@ else
fi fi
fi fi
mkdir -p $cachedir 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 if test ! -f $cachePath; then
wget -O $cachedir/nuget.exe $url 2>/dev/null || curl -o $cachedir/nuget.exe --location $url /dev/null wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null
fi fi
if test ! -e .nuget; then if test ! -e .nuget; then
mkdir .nuget mkdir .nuget
cp $cachedir/nuget.exe .nuget/nuget.exe cp $cachePath .nuget/nuget.exe
fi 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 KoreBuild -ExcludeVersion -o packages -nocache -pre
mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
fi fi

Просмотреть файл

@ -52,15 +52,16 @@ default DNVM_DEPLOY_BRANCH="${Environment.GetEnvironmentVariable("DNVM_DEPLOY_BR
#run-ps1-tests target='test' if='!IsLinux' #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":""}' 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' #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")}" 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 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 @{ functions @{
private static bool Quiet { get; set; }
string GetEnvironmentVariable(string key) { return Environment.GetEnvironmentVariable(key); } string GetEnvironmentVariable(string key) { return Environment.GetEnvironmentVariable(key); }
void SetEnvironmentVariable(string key, string value) { Environment.SetEnvironmentVariable(key, value); } void SetEnvironmentVariable(string key, string value) { Environment.SetEnvironmentVariable(key, value); }
} }