forked from bchavez/Bogus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using Bau Build system. And AppCI. Shields Up.
- Loading branch information
Showing
16 changed files
with
360 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
[assembly: AssemblyTitleAttribute("Bogus Fake Data Generator for .NET")] | ||
[assembly: AssemblyProductAttribute("Bogus")] | ||
[assembly: AssemblyCompanyAttribute("Brian Chavez")] | ||
[assembly: AssemblyCopyrightAttribute("Brian Chavez © 2015")] | ||
[assembly: AssemblyVersionAttribute("3.0.0.3")] | ||
[assembly: AssemblyFileVersion("3.0.0.3")] | ||
[assembly: AssemblyInformationalVersion("3.0.0.3 built on 8/18/2015 3:00:40 AM UTC")] | ||
[assembly: AssemblyVersionAttribute("3.0.1.4")] | ||
[assembly: AssemblyFileVersion("3.0.1.4")] | ||
[assembly: AssemblyInformationalVersion("3.0.1.4 built on 9/14/2015 6:44:29 PM UTC")] | ||
[assembly: AssemblyTrademark("MIT License")] | ||
[assembly: AssemblyDescriptionAttribute("http://www.github.com/bchavez/Bogus")] | ||
[assembly: InternalsVisibleTo("Bogus.Tests")] | ||
[assembly: ComVisible(false)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
using System; | ||
using System.IO; | ||
using BauCore; | ||
using BauMSBuild; | ||
using BauNuGet; | ||
using Builder.Utils; | ||
using FluentAssertions; | ||
using FluentBuild; | ||
|
||
namespace Builder | ||
{ | ||
public static class BauBuild | ||
{ | ||
//Build Tasks | ||
public const string Build = "build"; | ||
public const string Clean = "clean"; | ||
public const string Restore = "restore"; | ||
public const string BuildInfo = "buildinfo"; | ||
public const string Pack = "pack"; | ||
public const string Push = "push"; | ||
|
||
public static void Main(string[] args) | ||
{ | ||
AppDomain.CurrentDomain.UnhandledException += (sender, e) => | ||
{ | ||
Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~"); | ||
Console.WriteLine(" BUILDER ERROR "); | ||
Console.WriteLine("~~~~~~~~~~~~~~~~~~~~~~"); | ||
Console.WriteLine(e.ExceptionObject); | ||
Environment.Exit(1); | ||
}; | ||
|
||
var nugetExe = FindNugetExe(); | ||
|
||
new Bau(Arguments.Parse(args)) | ||
.DependsOn(Clean, Restore, Build) | ||
.MSBuild(Build).Desc("Invokes MSBuild to build solution") | ||
.DependsOn(Clean, BuildInfo) | ||
.Do(msb => | ||
{ | ||
msb.ToolsVersion = "14.0"; | ||
msb.Solution = Projects.SolutionFile.ToString(); | ||
msb.Properties = new | ||
{ | ||
Configuration = "Release", | ||
OutDir = Folders.CompileOutput | ||
}; | ||
msb.Targets = new[] { "Rebuild" }; | ||
}) | ||
.Task(BuildInfo).Desc("Creates dynamic AssemblyInfos for projects") | ||
.Do(() => | ||
{ | ||
Task.CreateAssemblyInfo.Language.CSharp(aid => | ||
{ | ||
Projects.BogusProject.AssemblyInfo(aid); | ||
var outputPath = Projects.BogusProject.Folder.SubFolder("Properties").File("AssemblyInfo.cs"); | ||
Console.WriteLine($"Creating AssemblyInfo file: {outputPath}"); | ||
aid.OutputPath(outputPath); | ||
}); | ||
}) | ||
.Task(Clean).Desc("Cleans project files") | ||
.Do(() => | ||
{ | ||
Console.WriteLine($"Removing {Folders.CompileOutput}"); | ||
Folders.CompileOutput.Wipe(); | ||
Directory.CreateDirectory(Folders.CompileOutput.ToString()); | ||
Console.WriteLine($"Removing {Folders.Package}"); | ||
Folders.Package.Wipe(); | ||
Directory.CreateDirectory(Folders.Package.ToString()); | ||
}) | ||
.NuGet(Pack).Desc("Packs NuGet packages") | ||
.DependsOn(Build).Do(ng => | ||
{ | ||
ng.Pack(Projects.BogusProject.NugetSpec.ToString(), | ||
p => | ||
{ | ||
p.BasePath = Folders.CompileOutput.ToString(); | ||
p.Version = BuildContext.FullVersion; | ||
p.Symbols = true; | ||
p.OutputDirectory = Folders.Package.ToString(); | ||
}) | ||
.WithNuGetExePathOverride(nugetExe.FullName); | ||
}) | ||
.NuGet(Push).Desc("Pushes NuGet packages") | ||
.DependsOn(Pack).Do(ng => | ||
{ | ||
ng.Push(Projects.BogusProject.NugetNupkg.ToString()) | ||
.WithNuGetExePathOverride(nugetExe.FullName); | ||
}) | ||
.NuGet(Restore).Desc("Restores NuGet packages") | ||
.Do(ng => | ||
{ | ||
ng.Restore(Projects.SolutionFile.ToString()) | ||
.WithNuGetExePathOverride(nugetExe.FullName); | ||
}) | ||
|
||
.Run(); | ||
} | ||
|
||
private static FileInfo FindNugetExe() | ||
{ | ||
Directory.SetCurrentDirectory(Folders.Lib.ToString()); | ||
var nugetExe = NuGetFileFinder.FindFile(); | ||
nugetExe.Should().NotBeNull(); | ||
Directory.SetCurrentDirectory(Folders.WorkingFolder.ToString()); | ||
return nugetExe; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.