Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (55 sloc) 2.62 KB
var PRODUCT = "Kayak"
var DESCRIPTION = "Kayak is an event-based IO libary for .NET. Kayak allows you to easily create TCP clients and servers, and contains an HTTP/1.1 server implementation."
var VERSION = "0.7.2"
var AUTHORS = "Benjamin van der Veen"
var COPYRIGHT = "Copyright 2007-2012 Benjamin van der Veen"
var LICENSE_URL = "https://github.com/kayak/kayak/raw/HEAD/LICENSE"
var PROJECT_URL = "https://github.com/kayak/kayak"
#default .build .test
var CONFIGURATION = "Release"
var BUILD_DIR = "${Directory.GetCurrentDirectory()}/build"
var OUTPUT_DIR = "${BUILD_DIR}/out"
var BIN_DIR = "${BUILD_DIR}/bin"
var PACKAGES_DIR = "packages"
use import="Files"
#assemblyinfo .clean
update-assemblyinfo include="Kayak/Properties/AssemblyInfo.cs" assemblyVersion="${VERSION}" assemblyTitle="${PRODUCT}" assemblyDescription="${DESCRIPTION}" assemblyCopyright="${COPYRIGHT}"
#ensure_submodules
exec program="git" commandline="submodule init"
exec program="git" commandline="submodule update"
#ensure_nuget_packages
for each='var file in Files.Include("**/packages.config")'
exec-clr program='.nuget/NuGet.exe' commandline='install ${file} -o packages'
#build .assemblyinfo .ensure_submodules .ensure_nuget_packages
build projectFile="Kayak.sln" outputDir="${OUTPUT_DIR}" configuration="${CONFIGURATION}"
#test .build
nunit testAssembly="${OUTPUT_DIR}/Kayak.Tests.dll" extra="-labels" nunitVersion="2.5.10.11092"
#binaries .build
@{
var binaries = Files.BasePath(OUTPUT_DIR).Include("*.dll", "*.pdb")
.Where(path => !Regex.Match(path, "nunit").Success)
.Where(path => !Regex.Match(path, ".Tests").Success)
.Where(path => !Regex.Match(path, "KayakExamples.").Success);
}
-Directory.CreateDirectory(BIN_DIR);
for each="var file in binaries"
log info="Copying ${file}"
-File.Copy(OUTPUT_DIR + "/" + file, BIN_DIR + "/" + file, true);
#dist_nuget .binaries .build
update-nuspec inputFile="Kayak.nuspec" outputFile="${BUILD_DIR}/Kayak.nuspec" id="${PRODUCT}" version="${VERSION}" authors="${AUTHORS}" description="${DESCRIPTION}" licenseUrl="${LICENSE_URL}" projectUrl="${PROJECT_URL}" tags="http io socket network async"
nuget-pack nuspecFile="${BUILD_DIR}/Kayak.nuspec" workingDir="${BUILD_DIR}" extra="-Symbols"
#dist_zip .build .binaries
@{/*
z.directories_to_zip BIN_DIR
z.output_file = "kayak-#{VERSION}.zip"
z.output_path = BUILD_DIR
*/}
#dist .test .dist_nuget .dist_zip
#clean
directory delete="${BUILD_DIR}"
directory delete="Kayak/bin"
directory delete="Kayak/obj"
directory delete="Kayak.Tests/bin"
directory delete="Kayak.Tests/obj"
#dist_clean
directory delete="${PACKAGES_DIR}"