Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve merge conflicts #6794

Merged
merged 1 commit into from
Mar 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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