Skip to content

Lotsa updates #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Oct 29, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/

# mstest test results
TestResults

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
*.vssscc
.builds

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*

# NCrunch
.*crunch*.local.xml

# 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
*.Publish.xml

# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
*.orig
Generated_Code #added for RIA/Silverlight projects

# 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

# NuGet temporary packages folder
packages

# any logs
*.log

# our output folder for build artifacts
artifacts

src/_NCrunch_FunnelWeb
GitRepoConfig.xml
build/NuGet/*
build/Published/*
Views\Extensions\*
19 changes: 16 additions & 3 deletions Deploy_To_Git.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
param([switch]$InitialDeploy)
param([switch]$init, [switch]$updateConfig, [switch]$dontBuild)

$ErrorActionPreference = "Stop";

Expand All @@ -10,6 +10,11 @@ function Get-ScriptDirectory

$root = Get-ScriptDirectory

if ($dontBuild -ne $true)
{
& $root\build.bat NOPAUSE
}

#Get Configuration File
if (!(Test-Path $root\GitRepoConfig.xml))
{
Expand Down Expand Up @@ -55,9 +60,11 @@ if (!(Test-Path "$deployTempDir"))
{
[System.IO.Directory]::CreateDirectory("$deployTempDir")
}

write-host "Temporary directory is $deployTempDir"
pushd "$deployTempDir"

if ($InitialDeploy -eq $false)
if ($init -eq $false)
{
& $git clone $repo .
& $git checkout
Expand All @@ -70,7 +77,7 @@ else
# copy new stuff over
copy "$root\build\published\*" "$deployTempDir" -recurse -force

if (!(Test-Path "$deployTempDir\my.config"))
if ($updateConfig -eq $false -and !(Test-Path "$deployTempDir\my.config"))
{
$myConfig = New-Object XML
$myConfig.Load("$deployTempDir\my.config.sample")
Expand All @@ -90,6 +97,12 @@ if (!(Test-Path "$deployTempDir\my.config"))
$myConfig.Save("$deployTempDir\my.config")
}

if ($updateConfig -eq $true)
{
write-host "Opening my.config for editing before deployment"
& notepad $deployTempDir\my.config | Out-Null
}

### Compatibility Steps
#Remove Obsolete Extensions

Expand Down
2 changes: 2 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ set framework=v4.0.30319

"%SystemDrive%\Windows\Microsoft.NET\Framework\%framework%\MSBuild.exe" build\Build.proj /t:Build /p:build_number=%appversion% /v:m
echo Done

if (%1)==(NOPAUSE) goto :eof
pause
10 changes: 2 additions & 8 deletions build/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="lib\MSBuild.Community.Tasks.Targets" />
<Import Project="lib\MSBuild.Deployment.Tasks.Targets" />
<Import Project="lib\MSBuild.Mercurial.tasks"/>

<PropertyGroup>
<Root>$(MSBuildStartupDirectory)</Root>
Expand All @@ -18,9 +17,7 @@
</PropertyGroup>

<Target Name="Version">
<HgVersion LocalPath=".">
<Output TaskParameter="Revision" PropertyName="Revision" />
</HgVersion>

</Target>

<Target Name="Build" DependsOnTargets="Version">
Expand Down Expand Up @@ -96,10 +93,7 @@
<MSBuild Projects="$(Root)\src\FunnelWeb.Web\FunnelWeb.Web.csproj"
Targets="ResolveReferences;_CopyWebApplication;_CopyBinDeployableAssemblies"
Properties="Configuration=Release;WebProjectOutputDir=$(Root)\build\Published\;OutDir=$(Root)\build\Published\bin\" />

<MSBuild Projects="$(Root)\src\FunnelWeb.Azure\FunnelWeb.Azure.ccproj"
Targets="Publish"
Properties="Configuration=Release;PublishDir=$(Root)\build\Artifacts\" />

<!-- Also copy extensions -->
<ItemGroup>
<ExtensionsToPublish Include="$(Root)\src\FunnelWeb.Web\bin\Extensions\*.dll" />
Expand Down
56 changes: 0 additions & 56 deletions src/FunnelWeb.Azure/FunnelWeb.Azure.ccproj

This file was deleted.

15 changes: 0 additions & 15 deletions src/FunnelWeb.Azure/ServiceConfiguration.Cloud.cscfg

This file was deleted.

15 changes: 0 additions & 15 deletions src/FunnelWeb.Azure/ServiceConfiguration.Local.cscfg

This file was deleted.

35 changes: 0 additions & 35 deletions src/FunnelWeb.Azure/ServiceDefinition.build.csdef

This file was deleted.

28 changes: 0 additions & 28 deletions src/FunnelWeb.Azure/ServiceDefinition.csdef

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private void CurrentSchemaVersionIs(int version)
private void RequiredApplicationVersionIs(int version)
{
applicationDatabase
.GetCoreRequiredScripts()
.GetCoreRequiredScripts(Arg.Any<Func<IDbConnection>>())
.Returns(Enumerable.Range(1, version).Select(x => "Script" + x + ".sql").ToArray());
}

Expand All @@ -125,7 +125,7 @@ private void CurrentExtensionVersionIs(int version)
private void RequiredExtensionVersionIs(int version)
{
applicationDatabase
.GetExtensionRequiredScripts(Arg.Any<ScriptedExtension>())
.GetExtensionRequiredScripts(Arg.Any<Func<IDbConnection>>(), Arg.Any<ScriptedExtension>())
.Returns(Enumerable.Range(1, version).Select(x => "Script" + x + ".sql").ToArray());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void WhenDatabaseProviderSpecificScriptIsPresentIgnoreGeneric()
});
var scriptProvider = new FunnelWebScriptProvider(assembly, s=>s.StartsWith("Script"), "sqlce");

var scripts = scriptProvider.GetScripts().ToList();
var scripts = scriptProvider.GetScripts(()=>null).ToList();

Assert.AreEqual("Script0001_sqlce.sql", scripts.Single(s => s.Name == "Script0001_sqlce.sql").Name);
Assert.AreEqual("Script0002.sql", scripts.Single(s => s.Name == "Script0002.sql").Name);
Expand Down
Loading