Skip to content

Commit

Permalink
resolve merge conflicts (#6794)
Browse files Browse the repository at this point in the history
  • Loading branch information
arjgupta authored Mar 26, 2018
1 parent a158328 commit 8848d61
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Tasks/AzureCloudPowerShellDeployment/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"version": {
"Major": 1,
"Minor": 2,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureCloudPowerShellDeployment/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"version": {
"Major": 1,
"Minor": 2,
"Patch": 0
"Patch": 1
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopy/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 109
"Patch": 110
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzureFileCopy/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 109
"Patch": 110
},
"demands": [
"azureps"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShell/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 3,
"Minor": 0,
"Patch": 0
"Patch": 1
},
"releaseNotes": "This is an early preview. Added support for Fail on standard error and ErrorActionPreference",
"demands": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/AzurePowerShell/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 3,
"Minor": 0,
"Patch": 0
"Patch": 1
},
"releaseNotes": "ms-resource:loc.releaseNotes",
"demands": [
Expand Down
25 changes: 18 additions & 7 deletions Tasks/Common/VstsAzureHelpers_/ImportFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,25 @@ function Import-FromModulePath {
} else {
# The AzureRM module was imported.
# Validate the AzureRM.profile module can be found.
$profileModule = (Get-Module -Name AzureRM).NestedModules | Where-Object { $_.Name.toLower() -eq "azurerm.profile" }
if (!$profileModule) {
throw (Get-VstsLocString -Key AZ_AzureRMProfileModuleNotFound)
# First check whether or not profile module is already loaded in the current session
$profileModule = Get-Module -Name AzureRm.Profile
if(!$profileModule) {
# otherwise check whether it is listed as a nested module in the azurerm module manifest ( this is valid till v 5.3.0 )
$profileModule = (Get-Module -Name AzureRM).NestedModules | Where-Object { $_.Name.toLower() -eq "azurerm.profile" }
# otherwise check whether it is listed as a required module in the azurerm module manifest ( valid from v 5.4.0 and up )
if(!$profileModule) {
$profileModule = (Get-Module -Name AzureRM).RequiredModules | Where-Object { $_.Name.toLower() -eq "azurerm.profile" }
}
if (!$profileModule) {
throw (Get-VstsLocString -Key AZ_AzureRMProfileModuleNotFound)
}
# Import and then store the AzureRM.profile module.
Write-Host "##[command]Import-Module -Name $($profileModule.Path) -Global"
$script:azureRMProfileModule = Import-Module -Name $profileModule.Path -Global -PassThru
} else {
$script:azureRMProfileModule = $profileModule
}
# Import and then store the AzureRM.profile module.
Write-Host "##[command]Import-Module -Name $($profileModule.Path) -Global"
$script:azureRMProfileModule = Import-Module -Name $profileModule.Path -Global -PassThru
Write-Verbose "Imported module version: $($script:azureRMProfileModule.Version)"
Write-Verbose "Imported module version: $($script:azureRMProfileModule.Version)"
}

return $true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ $rmModule = @{ Name = 'AzureRM' ;
@{
Name = "AzureRM.Compute"
}
)
);
RequiredModules = @()
}
Register-Mock Get-Module { $rmModule } -- -Name $rmModule.Name -ListAvailable
Register-Mock Get-Module { $rmModule } -- -Name $rmModule.Name
Expand Down

0 comments on commit 8848d61

Please sign in to comment.