Skip to content

Commit 35e620a

Browse files
Add ASP.NET Core build system
1 parent e59e2e0 commit 35e620a

File tree

9 files changed

+204
-1
lines changed

9 files changed

+204
-1
lines changed

.gitattributes

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
*.doc diff=astextplain
2+
*.DOC diff=astextplain
3+
*.docx diff=astextplain
4+
*.DOCX diff=astextplain
5+
*.dot diff=astextplain
6+
*.DOT diff=astextplain
7+
*.pdf diff=astextplain
8+
*.PDF diff=astextplain
9+
*.rtf diff=astextplain
10+
*.RTF diff=astextplain
11+
12+
*.jpg binary
13+
*.png binary
14+
*.gif binary
15+
16+
*.cs text=auto diff=csharp
17+
*.vb text=auto
18+
*.resx text=auto
19+
*.c text=auto
20+
*.cpp text=auto
21+
*.cxx text=auto
22+
*.h text=auto
23+
*.hxx text=auto
24+
*.py text=auto
25+
*.rb text=auto
26+
*.java text=auto
27+
*.html text=auto
28+
*.htm text=auto
29+
*.css text=auto
30+
*.scss text=auto
31+
*.sass text=auto
32+
*.less text=auto
33+
*.js text=auto
34+
*.lisp text=auto
35+
*.clj text=auto
36+
*.sql text=auto
37+
*.php text=auto
38+
*.lua text=auto
39+
*.m text=auto
40+
*.asm text=auto
41+
*.erl text=auto
42+
*.fs text=auto
43+
*.fsx text=auto
44+
*.hs text=auto
45+
46+
*.csproj text=auto
47+
*.vbproj text=auto
48+
*.fsproj text=auto
49+
*.dbproj text=auto
50+
*.sln text=auto eol=crlf
51+
*.sh eol=lf

.gitignore

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
11
[Oo]bj/
22
[Bb]in/
3+
TestResults/
4+
.nuget/
5+
*.sln.ide/
6+
_ReSharper.*/
37
packages/
48
artifacts/
9+
PublishProfiles/
510
*.user
611
*.suo
7-
node_modules
12+
*.cache
13+
*.docstates
14+
_ReSharper.*
15+
nuget.exe
816
project.lock.json
17+
*net45.csproj
18+
*net451.csproj
19+
*k10.csproj
20+
*.psess
21+
*.vsp
22+
*.pidb
23+
*.userprefs
24+
*DS_Store
25+
*.ncrunchsolution
26+
*.*sdf
27+
*.ipch
28+
929
.vs/
1030
npm-debug.log

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: csharp
2+
sudo: required
3+
dist: trusty
4+
addons:
5+
apt:
6+
packages:
7+
- gettext
8+
- libcurl4-openssl-dev
9+
- libicu-dev
10+
- libssl-dev
11+
- libunwind8
12+
- zlib1g
13+
mono:
14+
- 4.0.5
15+
os:
16+
- linux
17+
- osx
18+
osx_image: xcode7.1
19+
script:
20+
- ./build.sh verify

NuGet.Config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v2" />
5+
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
6+
</packageSources>
7+
</configuration>

NuGet.master.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="AspNetVNext" value="https://www.myget.org/f/aspnetmaster/api/v3/index.json" />
6+
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
7+
</packageSources>
8+
</configuration>

appveyor.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
init:
2+
- git config --global core.autocrlf true
3+
build_script:
4+
- build.cmd verify
5+
clone_depth: 1
6+
test: off
7+
deploy: off

build.cmd

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
@echo off
2+
cd %~dp0
3+
4+
SETLOCAL
5+
SET NUGET_VERSION=latest
6+
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
7+
SET BUILDCMD_KOREBUILD_VERSION=
8+
SET BUILDCMD_DNX_VERSION=
9+
10+
IF EXIST %CACHED_NUGET% goto copynuget
11+
echo Downloading latest version of NuGet.exe...
12+
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\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%'"
14+
15+
:copynuget
16+
IF EXIST .nuget\nuget.exe goto restore
17+
md .nuget
18+
copy %CACHED_NUGET% .nuget\nuget.exe > nul
19+
20+
:restore
21+
IF EXIST packages\Sake goto getdnx
22+
IF "%BUILDCMD_KOREBUILD_VERSION%"=="" (
23+
.nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
24+
) ELSE (
25+
.nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
26+
)
27+
.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
28+
29+
:getdnx
30+
IF "%BUILDCMD_DNX_VERSION%"=="" (
31+
SET BUILDCMD_DNX_VERSION=latest
32+
)
33+
IF "%SKIP_DNX_INSTALL%"=="" (
34+
CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default
35+
CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86 -alias default
36+
) ELSE (
37+
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
38+
)
39+
40+
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

build.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
3+
if test `uname` = Darwin; then
4+
cachedir=~/Library/Caches/KBuild
5+
else
6+
if [ -z $XDG_DATA_HOME ]; then
7+
cachedir=$HOME/.local/share
8+
else
9+
cachedir=$XDG_DATA_HOME;
10+
fi
11+
fi
12+
mkdir -p $cachedir
13+
nugetVersion=latest
14+
cachePath=$cachedir/nuget.$nugetVersion.exe
15+
16+
url=https://dist.nuget.org/win-x86-commandline/$nugetVersion/nuget.exe
17+
18+
if test ! -f $cachePath; then
19+
wget -O $cachePath $url 2>/dev/null || curl -o $cachePath --location $url /dev/null
20+
fi
21+
22+
if test ! -e .nuget; then
23+
mkdir .nuget
24+
cp $cachePath .nuget/nuget.exe
25+
fi
26+
27+
if test ! -d packages/Sake; then
28+
mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
29+
mono .nuget/nuget.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages
30+
fi
31+
32+
if ! type dnvm > /dev/null 2>&1; then
33+
source packages/KoreBuild/build/dnvm.sh
34+
fi
35+
36+
if ! type dnx > /dev/null 2>&1 || [ -z "$SKIP_DNX_INSTALL" ]; then
37+
dnvm install latest -runtime coreclr -alias default
38+
dnvm install default -runtime mono -alias default
39+
else
40+
dnvm use default -runtime mono
41+
fi
42+
43+
mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@"

makefile.shade

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
var VERSION='0.1'
3+
var FULL_VERSION='0.1'
4+
var AUTHORS='Microsoft Open Technologies, Inc.'
5+
6+
use-standard-lifecycle
7+
k-standard-goals

0 commit comments

Comments
 (0)