Skip to content

Commit

Permalink
Merge pull request #150 from Promact/addedPowerShellScript
Browse files Browse the repository at this point in the history
added Power shell script file
  • Loading branch information
chintans committed Feb 9, 2017
2 parents 58fb538 + 62955d6 commit 9b3f8fd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions deploy.cmd
Expand Up @@ -117,6 +117,13 @@ IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
IF !ERRORLEVEL! NEQ 0 goto error
)

:: 7. PowerShell Script
if EXIST "%DEPLOYMENT_SOURCE%\Slack.Automation\Promact.Erp.Web\Web.config" (
@ECHO OFF
PowerShell.exe -Command "& '%~dpn0.ps1'"
PAUSE
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

Expand Down
12 changes: 12 additions & 0 deletions deploy.ps1
@@ -0,0 +1,12 @@
$path = '%DEPLOYMENT_SOURCE%\Slack.Automation\Promact.Erp.Web\Web.config';
$xml = [xml](Get-Content $path);
$alldependentAssemblyNodes =
$xml.configuration.runtime.assemblyBinding.dependentAssembly;
foreach($node in $alldependentAssemblyNodes)
{
if($node.assemblyIdentity.name -eq 'System.Net.Http')
{
$node.bindingRedirect.newVersion='4.0.0.0';
}
}
$xml.Save($path);

0 comments on commit 9b3f8fd

Please sign in to comment.