Initial code
This commit is contained in:
commit
b20ee8784c
|
|
@ -0,0 +1,17 @@
|
|||
bin
|
||||
obj
|
||||
*.suo
|
||||
*.user
|
||||
_ReSharper.*
|
||||
*.DS_Store
|
||||
*.userprefs
|
||||
*.pidb
|
||||
*.vspx
|
||||
*.psess
|
||||
packages
|
||||
target
|
||||
artifacts
|
||||
StyleCop.Cache
|
||||
node_modules
|
||||
*.snk
|
||||
.nuget/NuGet.exe
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
|
||||
var PROJECT='AspNet'
|
||||
var VERSION='0.1.0'
|
||||
|
||||
use namespace='System'
|
||||
use namespace='System.IO'
|
||||
use namespace='System.Collections.Generic'
|
||||
|
||||
var repos='${new Dictionary<string,string> {
|
||||
{"HttpAbstractions", "git@github.com:aspnet/HttpAbstractions.git"},
|
||||
{"DependencyInjection", "git@github.com:aspnet/DependencyInjection.git"},
|
||||
{"FileSystem", "git@github.com:aspnet/FileSystem.git"},
|
||||
{"Logging", "git@github.com:aspnet/Logging.git"},
|
||||
{"Data", "git@github.com:aspnet/Data.git"},
|
||||
{"Razor", "git@github.com:aspnet/Razor.git"},
|
||||
{"Mvc", "git@github.com:aspnet/Mvc.git"},
|
||||
}}'
|
||||
|
||||
#default .pull .install
|
||||
|
||||
#pull
|
||||
|
||||
#install .pull
|
||||
|
||||
#git-pull target='pull'
|
||||
@{
|
||||
foreach(var repo in repos)
|
||||
{
|
||||
if(Directory.Exists(repo.Key))
|
||||
{
|
||||
GitPull(repo.Value, "dev", repo.Key);
|
||||
}
|
||||
else
|
||||
{
|
||||
GitClone(repo.Value, "dev");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#build-install target='install'
|
||||
@{
|
||||
foreach(var repo in repos)
|
||||
{
|
||||
Exec("build.cmd", "install", repo.Key);
|
||||
}
|
||||
}
|
||||
|
||||
macro name='GitPull' gitUri='string' gitBranch='string' gitFolder='string'
|
||||
git-pull
|
||||
|
||||
macro name='GitClone' gitUri='string' gitBranch='string'
|
||||
git-clone
|
||||
|
||||
macro name='Exec' program='string' commandline='string' workingdir='string'
|
||||
exec
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
@echo off
|
||||
cd %~dp0
|
||||
|
||||
IF EXIST .nuget\NuGet.exe goto part2
|
||||
echo Downloading latest version of NuGet.exe...
|
||||
mkdir .nuget
|
||||
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "((new-object net.webclient).DownloadFile('https://nuget.org/nuget.exe', '.nuget\NuGet.exe'))"
|
||||
|
||||
:part2
|
||||
set EnableNuGetPackageRestore=true
|
||||
.nuget\NuGet.exe install Sake -version 0.2 -o packages
|
||||
packages\Sake.0.2\tools\Sake.exe -I build -f Sakefile.shade %*
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
|
||||
default gitBranch=''
|
||||
|
||||
var gitCommand='clone ${gitUri}'
|
||||
set gitCommand='${gitCommand} --branch ${gitBranch}' if='!string.IsNullOrEmpty(gitBranch)'
|
||||
|
||||
git
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
|
||||
default gitBranch=''
|
||||
|
||||
var gitCommand='pull ${gitUri}'
|
||||
set gitCommand='${gitCommand} ${gitBranch}' if='!string.IsNullOrEmpty(gitBranch)'
|
||||
|
||||
git
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
default gitFolder=''
|
||||
|
||||
exec program='git' commandline='${gitCommand}' workingdir='${gitFolder}'
|
||||
|
||||
Loading…
Reference in New Issue