Skip to content

Commit

Permalink
Updates to websites git integration
Browse files Browse the repository at this point in the history
  • Loading branch information
markcowl committed Sep 15, 2017
1 parent e9b86e8 commit e2cfbc1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,12 @@ function Add-Remote
$ErrorActionPreference = 'Stop'
# Get app-level deployment credentials
$xml = [xml](Get-AzureRmWebAppPublishingProfile -Name $WebApp.Name -ResourceGroupName $WebApp.ResourceGroup -OutputFile null)
$username = $xml.SelectNodes("//publishProfile[@publishMethod=`"MSDeploy`"]/@userName").value
$password = $xml.SelectNodes("//publishProfile[@publishMethod=`"MSDeploy`"]/@userPWD").value
$username = [System.Uri]::EscapeDataString($xml.SelectNodes("//publishProfile[@publishMethod=`"MSDeploy`"]/@userName").value)
$password = [System.Uri]::EscapeDataString($xml.SelectNodes("//publishProfile[@publishMethod=`"MSDeploy`"]/@userPWD").value)
$remoteName = "azure"
$url = ("https://$username" + ':' + "$password@$($WebApp.EnabledHostNames[1])")
# Add the Azure remote to a local Git respository
$command = "git -C $GitRepositoryPath remote add $remoteName 'https://${username}:$password@$($WebApp.EnabledHostNames[0])'" + " 2> $gitOutput"
$command = "git -C $GitRepositoryPath remote add $remoteName $url"
Invoke-Expression -Command $command | Out-Null
if ($gitOutPut) {
$repoAdded = $false
Expand Down

0 comments on commit e2cfbc1

Please sign in to comment.