From 02692a720249dd89622c92eb71c229c428d905a7 Mon Sep 17 00:00:00 2001 From: Sergey Shandar Date: Wed, 6 Sep 2017 11:48:53 -0700 Subject: [PATCH] publishing. --- .../AzureRM.Compute.Experiments.psd1 | 10 +++++----- .../AzureRM.Compute.Experiments.psm1 | 5 ----- experiments/Compute.Experiments/publish-dev.ps1 | 13 +++++++++++++ 3 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 experiments/Compute.Experiments/publish-dev.ps1 diff --git a/experiments/Compute.Experiments/AzureRM.Compute.Experiments.psd1 b/experiments/Compute.Experiments/AzureRM.Compute.Experiments.psd1 index 1fafb572ea35..e1dea5f5f6a6 100644 --- a/experiments/Compute.Experiments/AzureRM.Compute.Experiments.psd1 +++ b/experiments/Compute.Experiments/AzureRM.Compute.Experiments.psd1 @@ -12,7 +12,7 @@ RootModule = ".\AzureRM.Compute.Experiments.psm1" # Version number of this module. -ModuleVersion = '1.0' +ModuleVersion = '1.0.1' # Supported PSEditions # CompatiblePSEditions = @() @@ -30,7 +30,7 @@ CompanyName = 'Microsoft' Copyright = 'Microsoft' # Description of the functionality provided by this module -# Description = '' +Description = 'Azure Compute' # Minimum version of the Windows PowerShell engine required by this module PowerShellVersion = '5.0' @@ -52,9 +52,9 @@ PowerShellVersion = '5.0' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @( - @{ ModuleName = 'AzureRM.Resources'; ModuleVersion = '4.3.1'; }, - @{ ModuleName = 'AzureRM.Network'; ModuleVersion = '4.3.1'; }, - @{ ModuleName = 'AzureRM.Compute'; ModuleVersion = '3.3.1'; } + @{ ModuleName = "AzureRM.Resources"; ModuleVersion = "4.3.1"; }, + @{ ModuleName = "AzureRM.Network"; ModuleVersion = "4.3.1"; }, + @{ ModuleName = "AzureRM.Compute"; ModuleVersion = "3.3.1"; } ) # Assemblies that must be loaded prior to importing this module diff --git a/experiments/Compute.Experiments/AzureRM.Compute.Experiments.psm1 b/experiments/Compute.Experiments/AzureRM.Compute.Experiments.psm1 index 135d1377755a..1adc61c083ff 100644 --- a/experiments/Compute.Experiments/AzureRM.Compute.Experiments.psm1 +++ b/experiments/Compute.Experiments/AzureRM.Compute.Experiments.psm1 @@ -23,12 +23,8 @@ function New-AzVm { throw "Unknown image: " + $ImageName } - Write-Host $vmImage - # Location - Write-Host "Load locations..." # $Location = (Get-AzureRmLocation | Select-Object -First 1 -Wait).Location - Write-Host "done" # Resource Group $resource = New-AzureRmResourceGroup -Name $ResourceGroupName -Location $Location @@ -110,7 +106,6 @@ function New-AzVm { } $vmImageImage = $vmImage.Image - Write-Host $vmImageImage $vmConfig = $vmConfig ` | Set-AzureRmVMSourceImage ` -PublisherName $vmImageImage.publisher ` diff --git a/experiments/Compute.Experiments/publish-dev.ps1 b/experiments/Compute.Experiments/publish-dev.ps1 new file mode 100644 index 000000000000..d3c462aa6eb2 --- /dev/null +++ b/experiments/Compute.Experiments/publish-dev.ps1 @@ -0,0 +1,13 @@ +$out = "..\build\AzureRM.Compute.Experiments\" +$repository = "sergey" +$dep = @("AzureRM.Resources", "AzureRM.Network", "AzureRM.Compute") +mkdir $out +copy .\AzureRM.Compute.Experiments.psd1 $out +copy .\AzureRM.Compute.Experiments.psm1 $out +foreach ($d in $dep) { + Install-Module $d -Repository $repository +} +Publish-Module -Path $out -Repository $repository -NuGetApiKey somekey +foreach ($d in $dep) { + Uninstall-Module $d +}