Skip to content

Commit

Permalink
removed update and revert database support form build scripts; EF 4.3…
Browse files Browse the repository at this point in the history
… will have it's own scripts in the NuGet console, and we auto-update during app start, so they weren't really needed. (fixes #221)
  • Loading branch information
half-ogre committed Feb 21, 2012
1 parent cd40fab commit cc3d420
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 75 deletions.
8 changes: 1 addition & 7 deletions Build-Solution.ps1
Original file line number Original file line Diff line number Diff line change
@@ -1,13 +1,7 @@
param($connectionString = "") param($connectionString = "")


$scriptPath = Split-Path $MyInvocation.MyCommand.Path $scriptPath = Split-Path $MyInvocation.MyCommand.Path
. (join-path $scriptPath Scripts\Get-ConnectionString.ps1)

if ($connectionString.Trim() -eq "")
{
$connectionString = Get-ConnectionString -configPath (join-path $scriptPath Website\web.config) -connectionStringName NuGetGallery
}


$projFile = join-path $scriptPath Scripts\NuGetGallery.msbuild $projFile = join-path $scriptPath Scripts\NuGetGallery.msbuild


& "$(get-content env:windir)\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" $projFile /p:DbConnection=$connectionString /t:FullBuild & "$(get-content env:windir)\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" $projFile /t:FullBuild
11 changes: 0 additions & 11 deletions Scripts/Get-ConnectionString.ps1

This file was deleted.

13 changes: 1 addition & 12 deletions Scripts/NuGetGallery.msbuild
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
</PropertyGroup> </PropertyGroup>


<UsingTask AssemblyFile="../3rdParty\xunit\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" /> <UsingTask AssemblyFile="../3rdParty\xunit\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" />
<UsingTask AssemblyFile="$(SolutionDir)..\Website\bin\NuGetGallery.Website.dll" TaskName="NuGetGallery.UpdateDatabase" />


<Target Name="Clean"> <Target Name="Clean">
<MSBuild Projects="..\NuGetGallery.sln" Targets="Clean" Properties="Configuration=$(Configuration)"/> <MSBuild Projects="..\NuGetGallery.sln" Targets="Clean" Properties="Configuration=$(Configuration)"/>
Expand All @@ -17,19 +16,9 @@
<Target Name="RunFacts" DependsOnTargets="Build"> <Target Name="RunFacts" DependsOnTargets="Build">
<xunit Assembly="..\Facts\bin\$(Configuration)\NuGetGallery.Facts.dll" Xml="NuGetGallery.Facts.results.xml" /> <xunit Assembly="..\Facts\bin\$(Configuration)\NuGetGallery.Facts.dll" Xml="NuGetGallery.Facts.results.xml" />
</Target> </Target>

<Target Name="RevertDatabase" DependsOnTargets="Build">
<Message Text="Reverting database" />
<UpdateDatabase TargetMigration="0" />
</Target>

<Target Name="UpdateDatabase" DependsOnTargets="Build">
<Message Text="Updating database" />
<UpdateDatabase />
</Target>


<Target Name="CIBuild" DependsOnTargets="RunFacts" /> <Target Name="CIBuild" DependsOnTargets="RunFacts" />


<Target Name="FullBuild" DependsOnTargets="RunFacts;UpdateDatabase" /> <Target Name="FullBuild" DependsOnTargets="RunFacts" />


</Project> </Project>
13 changes: 0 additions & 13 deletions Scripts/Revert-Database.ps1

This file was deleted.

13 changes: 0 additions & 13 deletions Scripts/Update-Database.ps1

This file was deleted.

18 changes: 0 additions & 18 deletions Website/BuildTasks/UpdateDatabase.cs

This file was deleted.

1 change: 0 additions & 1 deletion Website/Website.csproj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@
<Compile Include="AuthenticationController.generated.cs"> <Compile Include="AuthenticationController.generated.cs">
<DependentUpon>T4MVC.tt</DependentUpon> <DependentUpon>T4MVC.tt</DependentUpon>
</Compile> </Compile>
<Compile Include="BuildTasks\UpdateDatabase.cs" />
<Compile Include="Controllers\ApiController.cs" /> <Compile Include="Controllers\ApiController.cs" />
<Compile Include="Controllers\JsonApiController.cs" /> <Compile Include="Controllers\JsonApiController.cs" />
<Compile Include="Controllers\PagesController.cs" /> <Compile Include="Controllers\PagesController.cs" />
Expand Down

0 comments on commit cc3d420

Please sign in to comment.