Build with dotnet (#70).
This commit is contained in:
parent
9c734ddbab
commit
ce2f823c7d
|
|
@ -48,3 +48,5 @@
|
||||||
*.fsproj text=auto
|
*.fsproj text=auto
|
||||||
*.dbproj text=auto
|
*.dbproj text=auto
|
||||||
*.sln text=auto eol=crlf
|
*.sln text=auto eol=crlf
|
||||||
|
|
||||||
|
*.sh eol=lf
|
||||||
|
|
@ -25,3 +25,5 @@ nuget.exe
|
||||||
*.sln.ide
|
*.sln.ide
|
||||||
project.lock.json
|
project.lock.json
|
||||||
/.vs/
|
/.vs/
|
||||||
|
.testPublish/
|
||||||
|
.build/
|
||||||
|
|
@ -22,5 +22,9 @@ install:
|
||||||
- cd $OLDPWD
|
- cd $OLDPWD
|
||||||
mono:
|
mono:
|
||||||
- 4.0.5
|
- 4.0.5
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
osx_image: xcode7.1
|
||||||
script:
|
script:
|
||||||
- ./build.sh --quiet verify
|
- ./build.sh --quiet verify
|
||||||
|
|
|
||||||
|
|
@ -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/api/v3/index.json" />
|
|
||||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||||
|
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -4,4 +4,4 @@ build_script:
|
||||||
- build.cmd --quiet verify
|
- build.cmd --quiet verify
|
||||||
clone_depth: 1
|
clone_depth: 1
|
||||||
test: off
|
test: off
|
||||||
deploy: off
|
deploy: off
|
||||||
|
|
|
||||||
68
build.cmd
68
build.cmd
|
|
@ -1,40 +1,40 @@
|
||||||
@echo off
|
@ECHO off
|
||||||
cd %~dp0
|
|
||||||
|
|
||||||
SETLOCAL
|
SETLOCAL
|
||||||
|
|
||||||
|
SET REPO_FOLDER=%~dp0
|
||||||
|
CD "%REPO_FOLDER%"
|
||||||
|
|
||||||
|
SET BUILD_FOLDER=.build
|
||||||
|
SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet
|
||||||
|
SET KOREBUILD_VERSION=
|
||||||
|
|
||||||
|
SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe
|
||||||
SET NUGET_VERSION=latest
|
SET NUGET_VERSION=latest
|
||||||
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
|
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
|
||||||
SET BUILDCMD_KOREBUILD_VERSION=
|
|
||||||
SET BUILDCMD_DNX_VERSION=
|
|
||||||
|
|
||||||
IF EXIST %CACHED_NUGET% goto copynuget
|
IF NOT EXIST %BUILD_FOLDER% (
|
||||||
echo Downloading latest version of NuGet.exe...
|
md %BUILD_FOLDER%
|
||||||
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\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
|
|
||||||
md .nuget
|
|
||||||
copy %CACHED_NUGET% .nuget\nuget.exe > nul
|
|
||||||
|
|
||||||
:restore
|
|
||||||
IF EXIST packages\Sake goto getdnx
|
|
||||||
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
|
|
||||||
|
|
||||||
:getdnx
|
|
||||||
IF "%BUILDCMD_DNX_VERSION%"=="" (
|
|
||||||
SET BUILDCMD_DNX_VERSION=latest
|
|
||||||
)
|
|
||||||
IF "%SKIP_DNX_INSTALL%"=="" (
|
|
||||||
CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default
|
|
||||||
CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86 -alias default
|
|
||||||
) ELSE (
|
|
||||||
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
|
|
||||||
)
|
)
|
||||||
|
|
||||||
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*
|
IF NOT EXIST %NUGET_PATH% (
|
||||||
|
IF NOT EXIST %CACHED_NUGET% (
|
||||||
|
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://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
|
||||||
|
)
|
||||||
|
|
||||||
|
copy %CACHED_NUGET% %NUGET_PATH% > nul
|
||||||
|
)
|
||||||
|
|
||||||
|
IF NOT EXIST %KOREBUILD_FOLDER% (
|
||||||
|
SET KOREBUILD_DOWNLOAD_ARGS=
|
||||||
|
IF NOT "%KOREBUILD_VERSION%"=="" (
|
||||||
|
SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION%
|
||||||
|
)
|
||||||
|
|
||||||
|
%BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS%
|
||||||
|
)
|
||||||
|
|
||||||
|
"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %*
|
||||||
42
build.sh
42
build.sh
|
|
@ -1,5 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
buildFolder=.build
|
||||||
|
koreBuildFolder=$buildFolder/KoreBuild-dotnet
|
||||||
|
|
||||||
|
nugetPath=$buildFolder/nuget.exe
|
||||||
|
|
||||||
if test `uname` = Darwin; then
|
if test `uname` = Darwin; then
|
||||||
cachedir=~/Library/Caches/KBuild
|
cachedir=~/Library/Caches/KBuild
|
||||||
else
|
else
|
||||||
|
|
@ -11,33 +16,30 @@ else
|
||||||
fi
|
fi
|
||||||
mkdir -p $cachedir
|
mkdir -p $cachedir
|
||||||
nugetVersion=latest
|
nugetVersion=latest
|
||||||
cachePath=$cachedir/nuget.$nugetVersion.exe
|
cacheNuget=$cachedir/nuget.$nugetVersion.exe
|
||||||
|
|
||||||
url=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe
|
nugetUrl=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe
|
||||||
|
|
||||||
if test ! -f $cachePath; then
|
if test ! -d $buildFolder; then
|
||||||
wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null
|
mkdir $buildFolder
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test ! -e .nuget; then
|
if test ! -f $nugetPath; then
|
||||||
mkdir .nuget
|
if test ! -f $cacheNuget; then
|
||||||
cp $cachePath .nuget/nuget.exe
|
wget -O $cacheNuget $nugetUrl 2>/dev/null || curl -o $cacheNuget --location $nugetUrl /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp $cacheNuget $nugetPath
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test ! -d packages/Sake; then
|
if test ! -d $koreBuildFolder; then
|
||||||
mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
|
mono $nugetPath install KoreBuild-dotnet -ExcludeVersion -o $buildFolder -nocache -pre
|
||||||
mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
|
chmod +x $koreBuildFolder/build/KoreBuild.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! type dnvm > /dev/null 2>&1; then
|
makeFile=makefile.shade
|
||||||
source packages/KoreBuild/build/dnvm.sh
|
if [ ! -e $makeFile ]; then
|
||||||
|
makeFile=$koreBuildFolder/build/makefile.shade
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! type dnx > /dev/null 2>&1 || [ -z "$SKIP_DNX_INSTALL" ]; then
|
./$koreBuildFolder/build/KoreBuild.sh -n $nugetPath -m $makeFile "$@"
|
||||||
dnvm install latest -runtime coreclr -alias default
|
|
||||||
dnvm install default -runtime mono -alias default
|
|
||||||
else
|
|
||||||
dnvm use default -runtime mono
|
|
||||||
fi
|
|
||||||
|
|
||||||
mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@"
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
|
|
||||||
var VERSION='0.1'
|
|
||||||
var FULL_VERSION='0.1'
|
|
||||||
var AUTHORS='Microsoft Open Technologies, Inc.'
|
|
||||||
|
|
||||||
use-standard-lifecycle
|
|
||||||
k-standard-goals
|
|
||||||
|
|
@ -12,11 +12,16 @@ namespace AutobahnTestClient
|
||||||
{
|
{
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
public async Task Main(string[] args)
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
new Program().Run(args).Wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task Run(string[] args)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string serverAddress = "ws://localhost:9001";
|
string serverAddress = "ws://localhost:5000";
|
||||||
string agent =
|
string agent =
|
||||||
"ManagedWebSockets";
|
"ManagedWebSockets";
|
||||||
// "NativeWebSockets";
|
// "NativeWebSockets";
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
|
"compilationOptions": {
|
||||||
|
"emitEntryPoint": true
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNetCore.WebSockets.Client": "0.1.0-*"
|
"Microsoft.AspNetCore.WebSockets.Client": "0.1.0-*"
|
||||||
},
|
},
|
||||||
"commands": {
|
|
||||||
"run": "run"
|
|
||||||
},
|
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnx451": {}
|
"dnx451": {}
|
||||||
}
|
}
|
||||||
|
|
@ -2,16 +2,15 @@
|
||||||
"exclude": "wwwroot/**/*",
|
"exclude": "wwwroot/**/*",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNetCore.WebSockets.Server": "0.1.0-*",
|
"Microsoft.AspNetCore.WebSockets.Server": "0.1.0-*",
|
||||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*"
|
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
||||||
|
"Microsoft.NETCore.Platforms": "1.0.1-*"
|
||||||
},
|
},
|
||||||
"compilationOptions": {
|
"compilationOptions": {
|
||||||
"emitEntryPoint": true
|
"emitEntryPoint": true
|
||||||
},
|
},
|
||||||
"commands": {
|
|
||||||
"web": "AutobahnTestServer"
|
|
||||||
},
|
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnx451": {},
|
"dnx451": {},
|
||||||
"dnxcore50": {}
|
"dnxcore50": {}
|
||||||
}
|
},
|
||||||
|
"content": [ "hosting.json" ]
|
||||||
}
|
}
|
||||||
|
|
@ -1,17 +1,14 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNetCore.WebSockets.Protocol": "0.1.0-*",
|
|
||||||
"Microsoft.AspNetCore.WebSockets.Client": "0.1.0-*",
|
"Microsoft.AspNetCore.WebSockets.Client": "0.1.0-*",
|
||||||
"Microsoft.AspNetCore.WebSockets.Server": "0.1.0-*",
|
"Microsoft.AspNetCore.WebSockets.Server": "0.1.0-*",
|
||||||
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
|
||||||
"Microsoft.AspNetCore.Testing": "1.0.0-*",
|
"Microsoft.AspNetCore.Testing": "1.0.0-*",
|
||||||
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
"xunit": "2.1.0",
|
||||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
"xunit.runner.console": "2.1.0"
|
||||||
},
|
},
|
||||||
|
"testRunner": "xunit",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnx451": {}
|
"dnx451": {}
|
||||||
},
|
|
||||||
"commands": {
|
|
||||||
"test": "xunit.runner.aspnet"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2,11 +2,24 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNetCore.WebSockets.Protocol": "0.1.0-*",
|
"Microsoft.AspNetCore.WebSockets.Protocol": "0.1.0-*",
|
||||||
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
||||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
"xunit": "2.1.0"
|
||||||
},
|
},
|
||||||
|
"testRunner": "xunit",
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dnx451": {},
|
"dnx451": {
|
||||||
"dnxcore50": {}
|
"frameworkAssemblies": {
|
||||||
|
"System.Runtime": ""
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"xunit.runner.console": "2.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dnxcore50": {
|
||||||
|
"dependencies": {
|
||||||
|
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||||
|
},
|
||||||
|
"imports": "portable-net45+win8"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"commands": {
|
"commands": {
|
||||||
"test": "xunit.runner.aspnet"
|
"test": "xunit.runner.aspnet"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue