commit ea8fa6d3349a410538a589f1fac165198d17ae97 Author: Tommy Parnell Date: Mon Aug 24 21:43:42 2015 -0400 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f1192c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,218 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ +tools/ +*.lock +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions diff --git a/BuildEng.sln b/BuildEng.sln new file mode 100644 index 0000000..477a6a9 --- /dev/null +++ b/BuildEng.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildEng", "src\BuildEng\BuildEng.csproj", "{350121FB-82B9-4657-B7A0-08E94CA685AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildEng.UnitTests", "src\BuildEng.UnitTests\BuildEng.UnitTests.csproj", "{1F56EEA7-EDEE-4846-864A-86B60107684A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {350121FB-82B9-4657-B7A0-08E94CA685AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {350121FB-82B9-4657-B7A0-08E94CA685AF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {350121FB-82B9-4657-B7A0-08E94CA685AF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {350121FB-82B9-4657-B7A0-08E94CA685AF}.Release|Any CPU.Build.0 = Release|Any CPU + {1F56EEA7-EDEE-4846-864A-86B60107684A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F56EEA7-EDEE-4846-864A-86B60107684A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F56EEA7-EDEE-4846-864A-86B60107684A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F56EEA7-EDEE-4846-864A-86B60107684A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..8fdf38d --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +source 'http://rubygems.org' + +gem 'rake' +gem 'os' +gem 'albacore' +gem 'nokogiri' diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..674d52a --- /dev/null +++ b/Rakefile @@ -0,0 +1,84 @@ +require 'rake/clean' +require 'albacore' +require 'open-uri' +require 'fileutils' +require 'os' +require 'nokogiri' +require 'openssl' + + +PACKAGES = File.expand_path("packages") +TOOLS = File.expand_path("tools") +NUGET = File.expand_path("#{TOOLS}/nuget") +Configuration = ENV['CONFIGURATION'] || 'Release' + +CLEAN.include(['src/**/obj', 'src/**/bin', 'tool', 'packages/**']) + +desc 'Retrieve things' +task :retrieve => [:nuget_fetch] + +desc 'Does the build' +task :build => [:retrieve, :compile] + +desc 'Run unit Tests' +task :test => [:retrieve, :build, :nunit] + +desc 'retrieve, build, test, lint' +task :preflight => [:clean, :retrieve, :build, :test] + + +build :compile do |awesome| + + awesome.prop 'Configuration', Configuration + awesome.sln = 'BuildEng.sln' + +end + +test_runner :nunit do |tests| + tests.files = FileList["src/**/*UnitTests/bin/#{Configuration}/*UnitTests.dll"] # dll files with test + tests.exe = "packages/NUnit.Runners.2.6.4/tools/nunit-console.exe" # executable to run tests with +end + + + + # If we don't have a copy of nuget, download it + task :nuget_bootstrap do + puts 'Ensuring NuGet exists in tools/NuGet' + + if !FileTest.exist?("#{NUGET}/nuget.exe") + puts 'Downloading nuget from nuget.org' + + begin + FileUtils.mkdir_p("#{NUGET}") + File.open("#{NUGET}/nuget.exe", "wb") do |file| + file.write open('http://nuget.org/nuget.exe', {ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}).read + end + rescue + FileUtils.rm_rf("#{NUGET}/nuget.exe") + File.open("#{NUGET}/nuget.exe", "wb") do |file| + file.write open('https://nuget.org/nuget.exe', {ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE}).read + end + end + end + end + + # Fetch nuget dependencies for all packages + task :nuget_fetch => :nuget_bootstrap do + + # If we aren't running under windows, assume we're using mono + CMD_PREFIX = "" + if !OS.windows? + CMD_PREFIX = "mono" + begin + sh "mozroots --import --sync" #attempt to sync ssl things... + rescue + end + end + + # Make sure we get solution-level deps + #sh "#{CMD_PREFIX} #{NUGET}/nuget.exe i .nuget/packages.config -o packages" + + FileList["src/**/packages.config"].each { |filepath| + sh "#{CMD_PREFIX} #{NUGET}/nuget.exe i #{filepath} -o packages" + } + end diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..1f16360 --- /dev/null +++ b/Readme.md @@ -0,0 +1,3 @@ +This is a simple project that demonstrates how to build .NET projects with ruby and albacore. + +You can run `Rake -T to list the jobs` diff --git a/src/BuildEng.UnitTests/BuildEng.UnitTests.csproj b/src/BuildEng.UnitTests/BuildEng.UnitTests.csproj new file mode 100644 index 0000000..3a27458 --- /dev/null +++ b/src/BuildEng.UnitTests/BuildEng.UnitTests.csproj @@ -0,0 +1,80 @@ + + + + + Debug + AnyCPU + {1F56EEA7-EDEE-4846-864A-86B60107684A} + Library + Properties + BuildEng.UnitTests + BuildEng.UnitTests + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.dll + True + + + ..\..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.interfaces.dll + True + + + ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + True + + + ..\..\packages\NUnitTestAdapter.2.0.0\lib\nunit.util.dll + True + + + ..\..\packages\NUnitTestAdapter.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll + True + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/BuildEng.UnitTests/Class1.cs b/src/BuildEng.UnitTests/Class1.cs new file mode 100644 index 0000000..29976bc --- /dev/null +++ b/src/BuildEng.UnitTests/Class1.cs @@ -0,0 +1,14 @@ +using NUnit.Framework; + +namespace BuildEng.UnitTests +{ + [TestFixture] + public class Class1 + { + [Test] + public void init() + { + + } + } +} diff --git a/src/BuildEng.UnitTests/Properties/AssemblyInfo.cs b/src/BuildEng.UnitTests/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b0c638a --- /dev/null +++ b/src/BuildEng.UnitTests/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("BuildEng.UnitTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("BuildEng.UnitTests")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1f56eea7-edee-4846-864a-86b60107684a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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")] diff --git a/src/BuildEng.UnitTests/packages.config b/src/BuildEng.UnitTests/packages.config new file mode 100644 index 0000000..fd4ec35 --- /dev/null +++ b/src/BuildEng.UnitTests/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/BuildEng/BuildEng.csproj b/src/BuildEng/BuildEng.csproj new file mode 100644 index 0000000..3f365b8 --- /dev/null +++ b/src/BuildEng/BuildEng.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + 350121fb-82b9-4657-b7a0-08e94ca685af + Library + Properties + BuildEng + BuildEng + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/BuildEng/Class1.cs b/src/BuildEng/Class1.cs new file mode 100644 index 0000000..d371a70 --- /dev/null +++ b/src/BuildEng/Class1.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BuildEng +{ + public class Class1 + { + } +} diff --git a/src/BuildEng/Properties/AssemblyInfo.cs b/src/BuildEng/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c55e7ae --- /dev/null +++ b/src/BuildEng/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("BuildEng")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("BuildEng")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("350121fb-82b9-4657-b7a0-08e94ca685af")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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")]