зеркало из
1
0
Форкнуть 0
This commit is contained in:
David Fowler 2014-01-20 18:23:56 -08:00
Родитель 51b0a15dbe
Коммит 044229f22c
7 изменённых файлов: 122 добавлений и 16 удалений

13
.gitignore поставляемый
Просмотреть файл

@ -5,18 +5,14 @@
/TestResults
*.vspscc
*.vssscc
deploy
deploy/*
*.suo
*.cache
*.docstates
_ReSharper.*
*.csproj.user
*[Rr]e[Ss]harper.user
_ReSharper.*/
packages/*
artifacts/*
msbuild.log
PublishProfiles/
*.psess
*.vsp
@ -24,11 +20,4 @@ PublishProfiles/
*.userprefs
*DS_Store
*.ncrunchsolution
*.log
*.vspx
*.log.txt
/tests/Microsoft.AspNet.SignalR.FunctionalTests/artifacts/
/samples/Microsoft.AspNet.SignalR.Client.WindowsStoreJavaScript.Samples/bld/
jquery.signalR.js
jquery.signalR.min.js
xamarin/SignalRPackage/component/lib/mobile/
.nuget/NuGet.exe

12
build.cmd Normal file
Просмотреть файл

@ -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 makefile.shade %*

17
build/_k-build.shade Normal file
Просмотреть файл

@ -0,0 +1,17 @@
@{/*
k-build
Builds project. Downloads and executes k sdk tools.
projectFile=''
Required. Path to the project.json to build.
*/}
var projectFolder='${Path.GetDirectoryName(projectFile)}'
var projectName='${Path.GetFileName(projectFolder)}'
var projectBin='${Path.Combine(projectFolder, "bin")}'
-// directory delete="${projectBin}"
k command='build ${projectFolder}'
copy sourceDir='${projectBin}' outputDir='${Path.Combine(BUILD_DIR, projectName)}'

13
build/_k-clean.shade Normal file
Просмотреть файл

@ -0,0 +1,13 @@
@{/*
k-clean
Cleans project. Downloads and executes k sdk tools.
projectFile=''
Required. Path to the project.json to build.
*/}
var projectFolder='${Path.GetDirectoryName(projectFile)}'
k command='clean ${projectFolder}'

31
build/_k.shade Normal file
Просмотреть файл

@ -0,0 +1,31 @@
@{/*
k
Run klr commands in your project. Downloads and executes k sdk.
kVersion='0.0.1-pre-30109-087'
May be passed to override the nuget package version holding xunit console runner.
kProgram='...'
May be passed to override the path to the xunit program that will be executed
command=''
*/}
default kLatestSuccessful='\\wsr-teamcity\Drops\ProjectK.Main\latest-successful\sdk'
default kVersion=''
test if='string.IsNullOrEmpty(kVersion)'
for each='var file in System.IO.Directory.EnumerateFiles(kLatestSuccessful).Select(System.IO.Path.GetFileName)'
test if='file.StartsWith("ProjectK.") && file.EndsWith(".nupkg")'
- kVersion = file.Substring("ProjectK.".Length, file.Length - "ProjectK.".Length - ".nupkg".Length);
default kProgram='packages/ProjectK.${kVersion}/tools/k.cmd'
-// Download xunit from nuget sources if not already present
test if='!File.Exists(kProgram)'
log info='Installing ProjectK ${kVersion} from ${kLatestSuccessful}'
nuget-install package='ProjectK' packageVersion='${kVersion}' outputDir='packages' extra='-Source ${kLatestSuccessful}'
exec program='${Path.GetFullPath(kProgram)}' commandline='${command}'

44
makefile.shade Normal file
Просмотреть файл

@ -0,0 +1,44 @@
var VERSION='0.1'
var FULL_VERSION='0.1'
var AUTHORS='Microsoft'
default BASE_DIR='${Directory.GetCurrentDirectory()}'
default TARGET_DIR='${Path.Combine(BASE_DIR, "artifacts")}'
default BUILD_DIR='${Path.Combine(TARGET_DIR, "build")}'
default TEST_DIR='${Path.Combine(TARGET_DIR, "tests")}'
@{
E("K_BUILD_VERSION", "t" + DateTime.UtcNow.ToString("yyMMddHHmmss"));
}
use-standard-lifecycle
use-standard-goals
#build-clean target='clean'
k-clean each='var projectFile in Files.Include("src/**/project.json")'
#build-compile target='compile'
k-build each='var projectFile in Files.Include("src/**/project.json")'
@{
foreach (var nupkg in Files.Include(Path.Combine(BUILD_DIR, "*/*.nupkg")))
{
File.Copy(nupkg, Path.Combine(BUILD_DIR, Path.GetFileName(nupkg)), true);
}
}
#nuget-install target='install' description='Copy NuGet packages to local repo'
@{
var HOME_DIR = E("HOME");
if (string.IsNullOrEmpty(HOME_DIR))
{
HOME_DIR = E("HOMEDRIVE") + E("HOMEPATH");
}
}
copy sourceDir='${BUILD_DIR}' include='*.nupkg' outputDir='${Path.Combine(HOME_DIR, ".nuget")}' overwrite='${true}'
functions @{
string E(string key) { return Environment.GetEnvironmentVariable(key); }
void E(string key, string value) { Environment.SetEnvironmentVariable(key, value); }
}

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

@ -1,4 +1,4 @@
using System.Reflection;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// [assembly: AssemblyVersion("0.1")]
[assembly: AssemblyVersion("0.1")]
[assembly: AssemblyFileVersion("0.1")]