Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating build script

  • Loading branch information...
commit 0e02337aa725c8ccf30c1a81a139d5269c5aedc5 1 parent 9b6d08c
Louis DeJardin loudej authored
26 makefile.shade → Sakefile.shade
View
@@ -16,11 +16,15 @@ var packageDir='${Path.Combine(targetDir, "package")}'
var homeDir='${Environment.GetEnvironmentVariable("HOME")}'
set homeDir='${Environment.GetEnvironmentVariable("HOMEDRIVE") + Environment.GetEnvironmentVariable("HOMEPATH")}' if='string.IsNullOrEmpty(homeDir)'
-var appProjects = '${Files.Include("src/Main/**/*.*sproj", "src/Hosts/**/*.*sproj", "src/Adapters/**/*.*sproj")}'
+var appProjects = '${Files.Include("src/Main/**/*.*sproj", "src/Hosts/**/*.*sproj", "src/Adapters/**/*.*sproj").Exclude("src/**/*Adapters.AspNetWebApi.*")}'
var testProjects = '${Files.Include("src/Tests/**/*.*sproj")}'
var testAssemblies = '${Files.Include("target/test/*.Tests.dll").Exclude("target/test/*.HttpListener.Tests.dll")}'
-#CleanTargetDir target='clean'
+-// Odd compiler error from this project - need to figure that out
+set appProjects = '${appProjects.Exclude("src/**/*.AspNetWebApi.csproj")}' if='IsMono'
+set testProjects = '${testProjects.Exclude("src/**/*.AspNetWebApi.csproj")}' if='IsMono'
+
+#delete-target target='clean'
@{
if (Directory.Exists(targetDir))
{
@@ -29,28 +33,28 @@ var testAssemblies = '${Files.Include("target/test/*.Tests.dll").Exclude("target
}
}
-#ApplyVersion target='initialize'
- update-assemblyinfo assemblyVersion='${version}'
+#apply-version target='initialize'
+ assemblyinfo each='var assemblyFile in Files.Include("src/**/AssemblyInfo.cs")' assemblyVersion='${version}'
-#InstallPackages target='initialize'
+#install-packages target='initialize'
for each='var file in Files.Include("**/packages.config")'
exec-clr program='.nuget/NuGet.exe' commandline='install ${file} -o packages'
-#BuildApp target='compile'
+#build-app target='compile'
build each='var projectFile in appProjects' configuration='Release' outputDir='${buildDir}'
-#BuildTest target='test-compile'
+#build-tests target='test-compile'
build each='var projectFile in testProjects' configuration='Debug' outputDir='${testDir}'
-#NUnitTest target='test'
- nunit each='var testAssembly in testAssemblies'
+#run-tests target='test'
+ nunit each='var testFile in testAssemblies'
-#NugetPack target='package'
+#package-nuget target='package'
copy sourceDir='src/Deploy' outputDir='target/build' overwrite='${true}'
for each='var file in Files.BasePath(buildDir).Include("*.nuspec")'
var baseName='${Path.GetFileNameWithoutExtension(file)}'
nuget-pack nuspecFile='${file}' workingdir='${buildDir}' extra='-Properties "id=${baseName};authors=${authors}"'
-#NupkgInstall target='install'
+#install-nuget target='install'
copy sourceDir='${buildDir}' include='*.nupkg' outputDir='${Path.Combine(homeDir, ".nuget")}' overwrite='${true}'
3  build
View
@@ -1,4 +1,5 @@
+#!/bin/sh
EnableNuGetPackageRestore=true
mono --runtime=v4.0 ".nuget/NuGet.exe" install Sake -pre -o packages
-mono $(find packages/Sake.*/tools/Sake.exe|sort -r|head -n1) -I src/build "$@"
+mono $(find packages/Sake.*/tools/Sake.exe|sort -r|head -n1) "$@"
2  build.cmd
View
@@ -4,5 +4,5 @@ cd %~dp0
set EnableNuGetPackageRestore=true
".nuget\NuGet.exe" install Sake -pre -o packages
for /f "tokens=*" %%G in ('dir /AD /ON /B "packages\Sake.*"') do set __sake__=%%G
-"packages\%__sake__%\tools\Sake.exe" -I src/build %*
+"packages\%__sake__%\tools\Sake.exe" %*
set __sake__=
10 src/build/_nunit.shade
View
@@ -1,10 +0,0 @@
-
-default nunitVersion='2.5.10.11092'
-default nunitProgram='packages/NUnit.${nunitVersion}/tools/nunit-console.exe'
-default extra=''
-
-test if='!System.IO.File.Exists(nunitProgram)'
- exec-clr program='.nuget/NuGet.exe' commandline='install NUnit -version ${nunitVersion} -o packages'
-
-exec-clr program='${nunitProgram}' commandline='${testAssembly} ${extra}'
-
20 src/build/_update-assemblyinfo.shade
View
@@ -1,20 +0,0 @@
-
-default include='**/AssemblyInfo.cs'
-default assemblyVersion=''
-default assemblyFileVersion='${assemblyVersion}'
-
-update-file each='var updateFile in Files.Include(include)'
- @{
- if (!string.IsNullOrWhiteSpace(assemblyVersion))
- updateText = Replace(updateText, "AssemblyVersion\\([^\\)]*\\)", "AssemblyVersion(\"" + assemblyVersion + "\")");
- if (!string.IsNullOrWhiteSpace(assemblyFileVersion))
- updateText = Replace(updateText, "AssemblyFileVersion\\([^\\)]*\\)", "AssemblyFileVersion(\"" + assemblyFileVersion + "\")");
- }
-
-functions
- @{
- string Replace(string text, string pattern, string replace)
- {
- return System.Text.RegularExpressions.Regex.Replace(text, pattern, replace);
- }
- }
12 src/build/_update-file.shade
View
@@ -1,12 +0,0 @@
-
-var originalText='${System.IO.File.ReadAllText(updateFile)}'
-var updateText='${originalText}'
-render
-@{
- if (updateText != originalText)
- {
- Log.Info("Updating " + updateFile);
- System.IO.File.WriteAllText(updateFile, updateText);
- }
-}
-
Please sign in to comment.
Something went wrong with that request. Please try again.