Skip to content

Commit

Permalink
Enable debug by default and use Package script to disable it.
Browse files Browse the repository at this point in the history
  • Loading branch information
analogrelay committed Jan 21, 2013
1 parent 250fd6e commit a750430
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Scripts/Package.ps1
Expand Up @@ -62,9 +62,21 @@ function set-appsetting {
$resolvedPath = resolve-path($path)
$settings.save($resolvedPath)
}

function disable-debug {
param($path)

$settings = [xml](get-content $path)
$compilNode = $settings.configuration."system.web".compilation;
$compilNode.debug = "false";
$resolvedPath = resolve-path($path)
$settings.Save($resolvedPath);
}

set-appsetting -path $webConfigPath -name "Gallery.ReleaseBranch" -value $ReleaseBranch
set-appsetting -path $webConfigPath -name "Gallery.ReleaseSha" -value $ReleaseSha
set-appsetting -path $webConfigPath -name "Gallery.ReleaseTime" -value (Get-Date -format "dd/MM/yyyy HH:mm:ss")
disable-debug -path $webConfigPath

$startupScripts | ForEach-Object {
cp (Join-Path $ScriptRoot $_) (Join-Path $binPath $_)
Expand Down
4 changes: 2 additions & 2 deletions Website/Web.config
Expand Up @@ -110,7 +110,7 @@
</location>
<location path="api/v2/package">
<system.web>
<compilation debug="false" targetFramework="4.5">
<compilation targetFramework="4.5">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Expand Down Expand Up @@ -223,7 +223,7 @@
</system.Web>
-->
<system.web>
<compilation debug="false" targetFramework="4.5">
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Expand Down

0 comments on commit a750430

Please sign in to comment.