diff --git a/README.md b/README.md index 4eda652b..dcea5fb4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Build Status](https://bchavez.visualstudio.com/DefaultCollection/_apis/public/build/definitions/8ce74ee7-9d28-469e-8c5b-6d98f89c6398/1/badge) +[![Build status](https://ci.appveyor.com/api/projects/status/dxa14myphnlbplc6?svg=true)](https://ci.appveyor.com/project/bchavez/bogus) ![Nuget](https://img.shields.io/nuget/v/Bogus.svg) ![Users](https://img.shields.io/nuget/dt/Bogus.svg) Bogus for .NET/C# @@ -374,10 +374,12 @@ public void Handlebar() Building -------- * Download the source code. -* Run `build.bat`. +* Run `build.cmd`. -Upon successful build, the results will be in the `\__package` directory. -The `build.bat` compiles the C# code and embeds the locales in `Source\Bogus\data`. +Upon successful build, the results will be in the `\__compile` directory. +The `build.cmd` compiles the C# code and embeds the locales in `Source\Bogus\data`. +If you want to rebuild the NuGet packages run `build.cmd pack` and the NuGet +packages will be in `__package`. #### Rebundling Locales If you wish to re-bundle the latest **faker.js** locales, you'll need to first: diff --git a/Source/Bogus.sln b/Source/Bogus.sln index 70d2b986..2146a583 100644 --- a/Source/Bogus.sln +++ b/Source/Bogus.sln @@ -3,20 +3,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{2216B0E0-7ABC-4804-854D-3F24E59C0329}" - ProjectSection(SolutionItems) = preProject - .nuget\Bogus.nuspec = .nuget\Bogus.nuspec - .nuget\packages.config = .nuget\packages.config - EndProjectSection -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Builder", "Builder\Builder.csproj", "{86C6AA07-4C34-4A97-A72F-992F7DF6E2C4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bogus", "Bogus\Bogus.csproj", "{340A2FE9-5B52-4FD7-9D21-83CCF1621E09}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bogus.Tests", "Bogus.Tests\Bogus.Tests.csproj", "{C738E347-08EF-47DA-B531-EE99739BD759}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Github", "Github", "{5DA7A8D8-9A2C-4B8E-9F6D-B8334F3C585F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Root", "Root", "{5CA98FAF-2EF3-4B31-8123-19BB2A14206D}" ProjectSection(SolutionItems) = preProject + ..\appveyor.yml = ..\appveyor.yml + ..\build.cmd = ..\build.cmd ..\README.md = ..\README.md EndProjectSection EndProject diff --git a/Source/Bogus/Properties/AssemblyInfo.cs b/Source/Bogus/Properties/AssemblyInfo.cs index da85467f..b8dd3cec 100644 --- a/Source/Bogus/Properties/AssemblyInfo.cs +++ b/Source/Bogus/Properties/AssemblyInfo.cs @@ -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)] diff --git a/Source/Builder/BauBuild.cs b/Source/Builder/BauBuild.cs new file mode 100644 index 00000000..9d17d524 --- /dev/null +++ b/Source/Builder/BauBuild.cs @@ -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; + } + } +} \ No newline at end of file diff --git a/Source/Builder/BuildSettings.cs b/Source/Builder/BuildSettings.cs index 3c7d63c7..5e98aa9a 100644 --- a/Source/Builder/BuildSettings.cs +++ b/Source/Builder/BuildSettings.cs @@ -1,5 +1,5 @@ using System; -using Builder.Extensions; +using Builder.Utils; using FluentBuild; using FluentBuild.AssemblyInfoBuilding; using FluentFs.Core; @@ -12,42 +12,52 @@ public class Folders public static readonly Directory CompileOutput = WorkingFolder.SubFolder( "__compile" ); public static readonly Directory Package = WorkingFolder.SubFolder( "__package" ); public static readonly Directory Source = WorkingFolder.SubFolder( "source" ); + public static readonly Directory Builder = Source.SubFolder("Builder"); - public static readonly Directory Lib = Source.SubFolder( "packages" ); + public static readonly Directory Lib = Source.SubFolder( "packages" ); } - public class Projects + public class BuildContext + { + public static readonly string FullVersion = Environment.GetEnvironmentVariable("BUILD_VERSION").Trim() ?? "0.0.0.0"; + public static readonly string Version = FullVersion.WithoutPreReleaseName(); + public static readonly DateTime BuildDate = DateTime.UtcNow; + } + + public class Projects { private static void GlobalAssemblyInfo(IAssemblyInfoDetails aid) { aid.Company( "Brian Chavez" ) - .Copyright( "Brian Chavez © " + DateTime.UtcNow.Year ) - .Version( Properties.CommandLineProperties.Version() ) - .FileVersion( Properties.CommandLineProperties.Version() ) - .InformationalVersion( "{0} built on {1} UTC".With( Properties.CommandLineProperties.Version(), DateTime.UtcNow ) ) + .Copyright( "Brian Chavez © " + BuildContext.BuildDate.Year) + .Version( BuildContext.Version ) + .FileVersion( BuildContext.Version ) + .InformationalVersion( $"{BuildContext.FullVersion} built on {BuildContext.BuildDate} UTC" ) .Trademark( "MIT License" ) .Description( "http://www.github.com/bchavez/Bogus" ) - .ComVisible(false); + .AddCustomAttribute("System.Runtime.CompilerServices", "InternalsVisibleTo", true, "Bogus.Tests") + .ComVisible(false); } public static readonly File SolutionFile = Folders.Source.File( "Bogus.sln" ); public class BogusProject { - public static readonly Directory Folder = Folders.Source.SubFolder( "Bogus" ); - public static readonly File ProjectFile = Folder.File( "Bogus.csproj" ); - public static readonly Directory OutputDirectory = Folders.CompileOutput.SubFolder( "Bogus" ); - public static readonly File OutputDll = OutputDirectory.File( "Bogus.dll" ); - public static readonly Directory PackageDir = Folders.Package.SubFolder( "Bogus" ); + public const string Name = "Bogus"; + public static readonly Directory Folder = Folders.Source.SubFolder( Name ); + public static readonly File ProjectFile = Folder.File( $"{Name}.csproj" ); + public static readonly Directory OutputDirectory = Folders.CompileOutput.SubFolder( Name ); + public static readonly File OutputDll = OutputDirectory.File( $"{Name}.dll" ); + public static readonly Directory PackageDir = Folders.Package.SubFolder( Name ); - public static readonly File NugetSpec = Folders.Source.SubFolder(".nuget").File( "Bogus.nuspec" ); - public static readonly File NugetNupkg = Folders.Package.File( "Bogus.{0}.nupkg".With( Properties.CommandLineProperties.Version() ) ); + public static readonly File NugetSpec = Folders.Builder.SubFolder("NuGet").File( $"{Name}.nuspec" ); + public static readonly File NugetNupkg = Folders.Package.File( $"{Name}.{BuildContext.FullVersion}.nupkg"); public static readonly Action AssemblyInfo = i => { i.Title("Bogus Fake Data Generator for .NET") - .Product("Bogus"); + .Product(Name); GlobalAssemblyInfo(i); }; diff --git a/Source/Builder/Builder.csproj b/Source/Builder/Builder.csproj index 2a78bffb..5600981b 100644 --- a/Source/Builder/Builder.csproj +++ b/Source/Builder/Builder.csproj @@ -5,12 +5,13 @@ Debug AnyCPU {86C6AA07-4C34-4A97-A72F-992F7DF6E2C4} - Library + Exe Properties Builder Builder - v4.5.1 + v4.6 512 + true @@ -29,15 +30,42 @@ prompt 4 + + Builder.BauBuild + + + ..\packages\Bau.0.1.0-beta09\lib\net45\Bau.dll + True + + + ..\packages\Bau.MSBuild.0.1.0-beta01\lib\net45\Bau.MSBuild.dll + True + + + ..\packages\Bau.NuGet.0.1.0-alpha001\lib\net45\Bau.NuGet.dll + True + ..\packages\fasterflect.2.1.3\lib\net40\Fasterflect.dll True + + ..\packages\FluentBuild.1.2.0.0\lib\net40\fb.exe + True + ..\packages\FluentPath.1.1.0\lib\Net4\Fluent.IO.dll True + + ..\packages\FluentAssertions.4.0.0\lib\net45\FluentAssertions.dll + True + + + ..\packages\FluentAssertions.4.0.0\lib\net45\FluentAssertions.Core.dll + True + ..\packages\FluentBuild.1.2.0.0\lib\net40\FluentBuild.dll True @@ -55,14 +83,19 @@ True - ..\packages\NuGet.Core.2.8.5\lib\net40-Client\NuGet.Core.dll + ..\packages\Nuget.Core.2.8.5\lib\net40-Client\NuGet.Core.dll True ..\packages\NUnit.2.6.4\lib\nunit.framework.dll True + + ..\packages\ScriptCs.Contracts.0.9.0\lib\net45\ScriptCs.Contracts.dll + True + + @@ -72,15 +105,16 @@ + - - + + diff --git a/Source/Builder/Extensions/Extensions.cs b/Source/Builder/Extensions/Extensions.cs deleted file mode 100644 index 5af6311d..00000000 --- a/Source/Builder/Extensions/Extensions.cs +++ /dev/null @@ -1,28 +0,0 @@ -using FluentBuild.ApplicationProperties; -using FluentFs.Core; - -namespace Builder.Extensions -{ - public static class ExtensionsForCommandLineProperties - { - public static string Version(this CommandLineProperties p) - { - return System.Version.Parse( p.GetProperty( "Version" ) ).ToString(); - } - } - public static class ExtensionsForString - { - public static string With( this string format, params object[] args ) - { - return string.Format( format, args ); - } - } - - public static class ExtensionsForBuildFolders - { - public static Directory Wipe(this Directory f) - { - return f.Delete( OnError.Continue ).Create(); - } - } -} \ No newline at end of file diff --git a/Source/Builder/NuGet/Bogus.nuspec b/Source/Builder/NuGet/Bogus.nuspec new file mode 100644 index 00000000..63cc4c77 --- /dev/null +++ b/Source/Builder/NuGet/Bogus.nuspec @@ -0,0 +1,85 @@ + + + + Bogus + 0.0.0.0 + Brian Chavez + Brian Chavez + http://opensource.org/licenses/MIT + https://github.com/bchavez/Bogus + https://raw.githubusercontent.com/bchavez/Bogus/master/Docs/logo.png + false + A simple and sane data generator for populating objects that supports different locales. A delightful port of the famed faker.js and inspired by FluentValidation. Use it to create and load databases and UIs with mockup data. Get started by using Faker class or a DataSet directly. + A simple and sane data generator for populating objects that supports different locales. + + History: + v3.0.1.4 + * Added debug symbols to symbolsource.org. + + v3.0.0.4 + * Adding generators: Date.Month(), Date.Weekday() + * Sentences using lexically correct "A foo bar." + * Added Spanish Mexico (es_MX) locale. + + v3.0.0.3 + * Use latest Newtonsoft.Json 7.0.0.0, Issue #2 -Mpdreamz + + v3.0.0.2 + * Includes Ireland (English) locale. + + v3.0.0.1 + * Migrated to new FakerJS datafile format. Build system uses gulp file to directly import FakerJS locales. + * Faker.Parse() can now tokenize and replace handlebar formats. + * Added Faker.Hacker and Faker.Company properties. + * Added Custom separator on Lorem.Paragraph. + * Added Canada (French) (fr_CA) locale. + * Added Ukrainian (uk) locale. + * Added Ireland (en_IE) locale. + * Added Internet.Mac for mac addresses. + * Support for Canadian post/zip codes. + * Exposed Name.JobTitle, Name.JobDescriptor, Name.JobArea, Name.JobType + * Exposed Address.CountryCode + * Replace symbols in domain words so it generates output for all locales + * Support for gender names, but only for locales that support it. Russian('ru') but not English('en'). + * Corrected abbreviation for Yukon to reflect its official abbreviation of "YT". + + + v2.1.5.2: + * Fixed instantiating a Person in a non-US locale. -antongeorgiev + + v2.1.5.1: + * Added Georgian, Turkish, and Chinese (Taiwan) locales. + * Added Name.JobTitle() + * Added Internet.Url() and Internet.Protocol(). + * Sync'd up with faker.js v2.1.5. + + v2.1.4.2: + * Fixed bug in Faker.Person and Faker[T] that generates new person context after every new object. + * Added support for .FinishWith() for post-processing that runs after all rules but before returning new instance. + * Added Newtonsoft.Json as NuGet dependency. + + v2.1.4.1: + * Minor changes, mostly XML doc update and Person moved from DataSet to Bogus namespace. + + v2.1.4.0: + * Initial port from faker.js 2.1.4. + + Copyright 2015 + fake bogus poco data generator database seed values test-data test data + + + + + + + + + + + + + + + + diff --git a/Source/Builder/Tasks/BuildTasks.cs b/Source/Builder/Tasks/BuildTasks.cs deleted file mode 100644 index 9b85624c..00000000 --- a/Source/Builder/Tasks/BuildTasks.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using Builder.Extensions; -using Fluent.IO; -using FluentBuild; -using NUnit.Framework; - -namespace Builder.Tasks -{ - [TestFixture] - public class BuildTasks - { - [TestFixtureSetUp] - public void BeforeRunningTestSession() - { - Defaults.Logger.Verbosity = VerbosityLevel.Full; - - System.IO.Directory.SetCurrentDirectory( @"..\..\..\.." ); - - var version = Environment.GetEnvironmentVariable("BOGUS_VERSION"); - if( string.IsNullOrWhiteSpace(version) ) - version = "0.0.0.0"; - - Properties.CommandLineProperties.Add("Version", version); - } - - [Test] - [Explicit] - public void Clean() - { - Folders.CompileOutput.Wipe(); - Folders.Package.Wipe(); - } - - [Test] - [Explicit] - public void Prep() - { - //File assemblyInfoFile = Folders.CompileOutput.File("Global.AssemblyInfo.cs"); - Task.CreateAssemblyInfo.Language.CSharp(aid => - { - Projects.BogusProject.AssemblyInfo(aid); - aid.OutputPath(Projects.BogusProject.Folder.SubFolder("Properties").File("AssemblyInfo.cs")); - }); - - - //build the command line switch for msbuild - //msbuild Source\Bogus.sln /target:Rebuild /property:Configuration=Release;OutDir=c:\temp\outout - var msBuildArgs = new List - { - $"{Projects.SolutionFile}", - $"/target:Rebuild", - $"/property:Configuration=Release;OutDir={Projects.BogusProject.OutputDirectory}" - }; - - var msBuildArgsLine = string.Join(" ", msBuildArgs); - System.IO.File.WriteAllText("build.MSBuildArgs", msBuildArgsLine); - } - - [Test] - [Explicit] - public void Package() - { - Defaults.Logger.WriteHeader("PACKAGE"); - //copy compile directory to package directory - Fluent.IO.Path.Get(Projects.BogusProject.OutputDirectory.ToString()) - .Copy(Projects.BogusProject.PackageDir.ToString(), Overwrite.Always, true); - - string version = Properties.CommandLineProperties.Version(); - - Defaults.Logger.Write("RESULTS", "NuGet packing"); - - Fluent.IO.Path nuget = Fluent.IO.Path.Get(Folders.Lib.ToString()) - .Files("NuGet.exe", true).First(); - - Task.Run.Executable(e => e.ExecutablePath(nuget.FullPath) - .WithArguments("pack", Projects.BogusProject.NugetSpec.Path, "-Version", version, "-OutputDirectory", - Folders.Package.ToString())); - - Defaults.Logger.Write("RESULTS", "Setting NuGet PUSH script"); - - //Defaults.Logger.Write( "RESULTS", pushcmd ); - System.IO.File.WriteAllText("nuget.push.bat", - "{0} push {1}".With(nuget.MakeRelative().ToString(), - Path.Get(Projects.BogusProject.NugetNupkg.ToString()).MakeRelative().ToString()) + - Environment.NewLine); - } - - } -} \ No newline at end of file diff --git a/Source/Builder/Utils/BuildUtil.cs b/Source/Builder/Utils/BuildUtil.cs index 1f421ab7..14168c3b 100644 --- a/Source/Builder/Utils/BuildUtil.cs +++ b/Source/Builder/Utils/BuildUtil.cs @@ -1,6 +1,5 @@ using System.Linq; using System.Xml.XPath; -using Builder.Extensions; using FluentFs.Core; namespace Builder.Utils diff --git a/Source/Builder/Utils/Extensions.cs b/Source/Builder/Utils/Extensions.cs new file mode 100644 index 00000000..049b29e2 --- /dev/null +++ b/Source/Builder/Utils/Extensions.cs @@ -0,0 +1,37 @@ +using FluentBuild.ApplicationProperties; +using FluentFs.Core; + +namespace Builder.Utils +{ + public static class ExtensionsForString + { + public static string With(this string format, params object[] args) + { + return string.Format(format, args); + } + } + + public static class ExtensionsForBuildFolders + { + public static Directory Wipe(this Directory f) + { + return f.Delete(OnError.Continue).Create(); + } + } + + public static class ExtensionsForBuildContext + { + public static string WithoutPreReleaseName(this string version) + { + if (string.IsNullOrWhiteSpace(version)) return "0.0.0.0"; + var dash = version.IndexOf("-"); + return dash > 0 ? version.Substring(0, dash) : version.Trim(); + } + + public static string PreReleaseName(this string version) + { + var dash = version.IndexOf("-"); + return dash > 0 ? version.Substring(dash + 1) : null; + } + } +} \ No newline at end of file diff --git a/Source/Builder/app.config b/Source/Builder/app.config index 86597b02..d9bda6ce 100644 --- a/Source/Builder/app.config +++ b/Source/Builder/app.config @@ -1,5 +1,5 @@ - + - \ No newline at end of file + diff --git a/Source/Builder/packages.config b/Source/Builder/packages.config index d1ac7ba3..61d19b5f 100644 --- a/Source/Builder/packages.config +++ b/Source/Builder/packages.config @@ -1,12 +1,17 @@  - - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..f2012e37 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,13 @@ +version: 0.0.{build} + +build_script: build.cmd pack + +test: + assemblies: + - __compile\Bogus.Tests.dll + +artifacts: + - path: __package\*.nupkg + +nuget: + disable_publish_on_pr: true \ No newline at end of file diff --git a/build.bat b/build.bat deleted file mode 100644 index 8136a4ed..00000000 --- a/build.bat +++ /dev/null @@ -1,39 +0,0 @@ -@ECHO OFF -SETLOCAL - -set BOGUS_VERSION=3.0.0.3 -set TaskRunner=Source\packages\NUnit.Runners.2.6.4\tools\nunit-console.exe Source\Builder\bin\debug\Builder.dll /nodots /nologo /noxml - - -IF NOT DEFINED DevEnvDir ( - IF DEFINED vs140comntools ( - CALL "%vs140comntools%\vsvars32.bat" - ) -) - -msbuild source\Builder\Builder.csproj -if %errorlevel% neq 0 exit /b %errorlevel% - -ECHO #################################### -ECHO CLEAN -ECHO #################################### -%TaskRunner% /run:Builder.Tasks.BuildTasks.Clean -if %errorlevel% neq 0 exit /b %errorlevel% - -ECHO #################################### -ECHO Prep -ECHO #################################### -%TaskRunner% /run:Builder.Tasks.BuildTasks.Prep -if %errorlevel% neq 0 exit /b %errorlevel% - -ECHO #################################### -ECHO Build -ECHO #################################### -msbuild @build.MSBuildArgs -if %errorlevel% neq 0 exit /b %errorlevel% - -ECHO #################################### -ECHO Package -ECHO #################################### -%TaskRunner% /run:Builder.Tasks.BuildTasks.Package -if %errorlevel% neq 0 exit /b %errorlevel% \ No newline at end of file diff --git a/build.cmd b/build.cmd new file mode 100644 index 00000000..6498c951 --- /dev/null +++ b/build.cmd @@ -0,0 +1,21 @@ +@ECHO OFF +SETLOCAL + +set BUILD_VERSION=3.0.1.4 + +IF NOT DEFINED DevEnvDir ( + IF DEFINED vs140comntools ( + CALL "%vs140comntools%\vsvars32.bat" + ) +) + +nuget restore Source\Bogus.sln + +msbuild Source\Builder\Builder.csproj +if %errorlevel% neq 0 exit /b %errorlevel% + +ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ECHO RUNNING BAU BUILDER +ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Source\Builder\bin\Debug\Builder.exe %1 +if %errorlevel% neq 0 exit /b %errorlevel%