Skip to content
Closed
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
14 changes: 12 additions & 2 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<SetupOutputDirectory>$(PublishDirectory)\Setup</SetupOutputDirectory>
<TestOutputDirectory>$(PublishDirectory)\TestResults</TestOutputDirectory>
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
<NuGetPublishingSource Condition=" '$(NuGetPublishingSource)' == '' ">http://psget/PSGallery/api/v2/</NuGetPublishingSource>
<NuGetPublishingSource Condition=" '$(NuGetPublishingSource)' == '' ">https://dtlgalleryint.cloudapp.net/api/v2</NuGetPublishingSource>
<Scope Condition=" $(Scope) == '' " >all</Scope>
</PropertyGroup>
<ItemGroup>
Expand Down Expand Up @@ -160,8 +160,14 @@
ContinueOnError="false" />

<CallTarget Targets="CodeSignBinaries" Condition=" '$(CodeSign)' == 'true' " />
</Target>

<!-- Build all flavors of the installers -->
<Target Name="BuildInstaller">
<Message Importance="high" Text="Building Installers..." />

<Exec Command="$(PowerShellCommand) -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\BuildInstaller.ps1 $(Configuration) \&quot;$(NuGetPublishingSource)\&quot; &quot;"/>

<Message Importance="high" Text="Building Setup..." />
<MSBuild
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are the modules/dlls get into the "Package" folder if we don't call either BuildInstaller.ps1 or SaveModules.ps1 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This task should be called as part of Build and its splitted now just to be called from BuildInstaller.ps1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we should be able to build an MSI via msbuild that calls posh script and not vice-versa.

Projects="@(SetupPowershellGetSln)"
Targets="Build"
Expand All @@ -176,6 +182,10 @@
ContinueOnError="false"
Condition=" '$(Scope)' == 'all' "/>

<Message Importance="high" Text="MSI file path: setup\build\$(Configuration)\AzurePowerShell.msi" />

<Message Importance="high" Text="MSI for PowerShell Gallery: setup-powershellget\build\$(Configuration)\AzurePowerShellGet.msi" />

<CallTarget Targets="CodeSignInstaller"
Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == 'all'" />
</Target>
Expand Down
4 changes: 2 additions & 2 deletions setup/azurecmd.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<Component Id="PSModulePath.System" Guid="273525B9-7AAB-421A-90C8-8E50A1840B8D">
<CreateFolder />
<!-- Work around bug that PowerShell does not always consider default module paths. -->
<Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="[BaseModulesFolder];[PowerShellFolder]ResourceManager\AzureResourceManager;[PowerShellFolder]ServiceManagement" System="yes" />
<Environment Id="PSModulePath.SystemAppRoot" Action="set" Name="PSMODULEPATH" Part="last" Value="[BaseModulesFolder];[PowerShellFolder]" System="yes" />
</Component>
</DirectoryRef>

Expand All @@ -105,7 +105,7 @@
Name="Microsoft Azure PowerShell"
Description="Microsoft PowerShell cmdlets"
Target="[POWERSHELLPATH]\powershell.exe"
Arguments="-NoExit -ExecutionPolicy Bypass -File &quot;[PowerShellFolder]ServiceManagement\Azure\Services\ShortcutStartup.ps1&quot;"/>
Arguments="-NoExit -ExecutionPolicy Bypass -File &quot;[PowerShellFolder]Azure\Services\ShortcutStartup.ps1&quot;"/>
<RemoveFolder Id="AzureSdkMenu" On="uninstall"/>
<RemoveFile Id="RemoveStaleFiles" Directory="StaleAzureSdkMenu" Name="Windows Azure PowerShell.lnk" On="both"/>
<RegistryValue Root="HKCU" Key="SOFTWARE\Microsoft\Microsoft SDKs\WindowsAzure\$(var.version)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
Expand Down
6,075 changes: 0 additions & 6,075 deletions setup/azurecmdfiles.wxi

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -209,16 +209,16 @@ public void SetupModules(AzureModule mode, params string[] modules)
this.modules = new List<string>();
if (mode == AzureModule.AzureProfile)
{
this.modules.Add(Path.Combine(PackageDirectory, @"ServiceManagement\Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectory, @"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"));
this.modules.Add(Path.Combine(PackageDirectory, @"Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectory, @"AzureResourceManager.psd1"));
}
else if (mode == AzureModule.AzureServiceManagement)
{
this.modules.Add(Path.Combine(PackageDirectory, @"ServiceManagement\Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectory, @"Azure\Azure.psd1"));
}
else if (mode == AzureModule.AzureResourceManager)
{
this.modules.Add(Path.Combine(PackageDirectory, @"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"));
this.modules.Add(Path.Combine(PackageDirectory, @"AzureResourceManager.psd1"));
}
else
{
Expand All @@ -234,16 +234,16 @@ public void SetupModulesFromCommon(AzureModule mode, params string[] modules)
this.modules = new List<string>();
if (mode == AzureModule.AzureProfile)
{
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"ServiceManagement\Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"AzureResourceManager.psd1"));
}
else if (mode == AzureModule.AzureServiceManagement)
{
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"ServiceManagement\Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"Azure\Azure.psd1"));
}
else if (mode == AzureModule.AzureResourceManager)
{
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"AzureResourceManager.psd1"));
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void CLICommonBVTInitialize(TestContext testContext)
Test.Info("Clean storage context in PowerShell");
PowerShellAgent.CleanStorageContext();

PowerShellAgent.ImportModule(@".\ServiceManagement\Azure\Storage\Microsoft.WindowsAzure.Commands.Storage.dll");
PowerShellAgent.ImportModule(@".\Azure\Storage\Microsoft.WindowsAzure.Commands.Storage.dll");


// import module
Expand Down
6 changes: 3 additions & 3 deletions src/Common/Storage/Commands.Storage/Commands.Storage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\Package\Debug\ServiceManagement\Azure\Azure.Storage</OutputPath>
<OutputPath>..\..\..\Package\Debug\Azure.Storage</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -32,7 +32,7 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<DelaySign>true</DelaySign>
<OutputPath>..\..\..\Package\Release\ServiceManagement\Azure\Azure.Storage</OutputPath>
<OutputPath>..\..\..\Package\Release\Azure.Storage</OutputPath>
<DefineConstants>TRACE;SIGN</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
Expand Down Expand Up @@ -317,6 +317,6 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
<PropertyGroup>
<PostBuildEvent>powershell.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)\PostBuild.ps1" "..\..\..\ResourceManager\AzureResourceManager"</PostBuildEvent>
<PostBuildEvent>powershell.exe -ExecutionPolicy Unrestricted -File "$(ProjectDir)\PostBuild.ps1" "..\..\..\Package\$(ConfigurationName)\Azure\Azure.Storage"</PostBuildEvent>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TypesToProcess = @()
FormatsToProcess = @()

# Modules to import as nested modules of the module specified in ModuleToProcess
NestedModules = '..\..\..\Package\Debug\ServiceManagement\Azure\Storage\Microsoft.WindowsAzure.Commands.Storage.dll'
NestedModules = '..\..\..\Package\Debug\Azure\Storage\Microsoft.WindowsAzure.Commands.Storage.dll'

# Functions to export from this module
FunctionsToExport = '*'
Expand Down
2 changes: 1 addition & 1 deletion src/Local.testsettings
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<DeploymentItem filename="ServiceManagement\Sql\Commands.SqlDatabase.Test\TestScripts\" />
<DeploymentItem filename="Common\Commands.ScenarioTest\Resources\" />
<DeploymentItem filename="Common\Commands.ScenarioTest\bin\Debug\" />
<DeploymentItem filename="Package\Debug\ServiceManagement\Azure\Services\Resources" outputDirectory="Resources" />
<DeploymentItem filename="Package\Debug\Azure\Services\Resources" outputDirectory="Resources" />
</Deployment>
<Execution>
<Timeouts testTimeout="3000000" />
Expand Down
2 changes: 1 addition & 1 deletion src/Local.x64.testsettings
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Deployment>
<DeploymentItem filename="Common\Commands.ScenarioTest\Resources\" />
<DeploymentItem filename="ServiceManagement\Compute\Commands.ServiceManagement.Extensions.Test\Resources\" />
<DeploymentItem filename="Package\Debug\ServiceManagement\Azure\Services\Resources" outputDirectory="Resources" />
<DeploymentItem filename="Package\Debug\Azure\Services\Resources" outputDirectory="Resources" />
<DeploymentItem filename="ServiceManagement\Sql\Commands.SqlDatabase.Test\TestScripts\" />
<DeploymentItem filename="ServiceManagement\Sql\Commands.SqlDatabase.Test\Resources\" />
<DeploymentItem filename="ResourceManager\Resources\Commands.Resources.Test\Resources\" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.ApiManagement\</OutputPath>
<OutputPath>..\..\..\Package\Debug\AzureRM.ApiManagement\</OutputPath>
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -30,7 +30,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\AzureRM.ApiManagement\</OutputPath>
<OutputPath>..\..\..\Package\Release\AzureRM.ApiManagement\</OutputPath>
<DefineConstants>TRACE;SIGN</DefineConstants>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\Management.Automation.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TypesToProcess = @()
FormatsToProcess = @()

# Modules to import as nested modules of the module specified in ModuleToProcess
NestedModules = '..\..\..\Package\Debug\ResourceManager\AzureResourceManager\ApiManagement\Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll'
NestedModules = '..\..\..\Package\Debug\ApiManagement\Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll'

# Functions to export from this module
FunctionsToExport = '*'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.ApiManagement\</OutputPath>
<OutputPath>..\..\..\Package\Debug\AzureRM.ApiManagement\</OutputPath>
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -29,7 +29,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\AzureRM.ApiManagement\</OutputPath>
<OutputPath>..\..\..\Package\Release\AzureRM.ApiManagement\</OutputPath>
<DefineConstants>TRACE;SIGN</DefineConstants>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\Management.Automation.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TypesToProcess = @()
FormatsToProcess = @()

# Modules to import as nested modules of the module specified in ModuleToProcess
NestedModules = '..\..\..\Package\Debug\ResourceManager\AzureResourceManager\ApiManagement\Microsoft.Azure.Commands.ApiManagement.dll'
NestedModules = '..\..\..\Package\Debug\ApiManagement\Microsoft.Azure.Commands.ApiManagement.dll'

# Functions to export from this module
FunctionsToExport = '*'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Automation\</OutputPath>
<OutputPath>..\..\..\Package\Debug\AzureRM.Automation\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -33,7 +33,7 @@
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\AzureRM.Automation\</OutputPath>
<OutputPath>..\..\..\Package\Release\AzureRM.Automation\</OutputPath>
<DefineConstants>TRACE;SIGN</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Backup\</OutputPath>
<OutputPath>..\..\..\Package\Debug\AzureRM.Backup\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -30,7 +30,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\AzureRM.Backup\</OutputPath>
<OutputPath>..\..\..\Package\Release\AzureRM.Backup\</OutputPath>
<DefineConstants>TRACE;SIGN</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ FormatsToProcess = @()

# Modules to import as nested modules of the module specified in ModuleToProcess
NestedModules = @(
'..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureBackup\Microsoft.Azure.Commands.AzureBackup.dll'
'..\..\..\Package\Debug\AzureBackup\Microsoft.Azure.Commands.AzureBackup.dll'
)

# Functions to export from this module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Batch\</OutputPath>
<OutputPath>..\..\..\Package\Debug\AzureRM.Batch\</OutputPath>
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -30,7 +30,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\AzureRM.Batch\</OutputPath>
<OutputPath>..\..\..\Package\Release\AzureRM.Batch\</OutputPath>
<DefineConstants>TRACE;SIGN</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public string RMProfileModule
get
{
return Path.Combine(this.PackageDirectory,
@"ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRM.Profile.psd1");
@"AzureRM.Profile\AzureRM.Profile.psd1");
}
}

Expand All @@ -86,7 +86,7 @@ public string RMResourceModule
get
{
return Path.Combine(this.PackageDirectory,
@"ResourceManager\AzureResourceManager\AzureRM.Resources\AzureRM.Resources.psd1");
@"AzureRM.Resources\AzureRM.Resources.psd1");
}
}

Expand All @@ -95,7 +95,7 @@ public string RMStorageModule
get
{
return Path.Combine(this.PackageDirectory,
@"ResourceManager\AzureResourceManager\AzureRM.Storage\AzureRM.Storage.psd1");
@"AzureRM.Storage\AzureRM.Storage.psd1");
}
}

Expand All @@ -105,15 +105,15 @@ public string RMStorageDataPlaneModule
get
{
return Path.Combine(this.PackageDirectory,
@"ResourceManager\AzureResourceManager\Azure.Storage\Azure.Storage.psd1");
@"Azure.Storage\Azure.Storage.psd1");
}
}

public string GetRMModulePath(string psd1FileName)
{
string basename = Path.GetFileNameWithoutExtension(psd1FileName);
return Path.Combine(this.PackageDirectory,
@"ResourceManager\AzureResourceManager\" + basename + @"\" + psd1FileName);
@"" + basename + @"\" + psd1FileName);
}
/// <summary>
/// Loads DummyManagementClientHelper with clients and throws exception if any client is missing.
Expand Down Expand Up @@ -254,12 +254,12 @@ public void SetupModules(AzureModule mode, params string[] modules)
this.modules = new List<string>();
if (mode == AzureModule.AzureProfile)
{
this.modules.Add(Path.Combine(PackageDirectory, @"ServiceManagement\Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectory, @"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"));
this.modules.Add(Path.Combine(PackageDirectory, @"Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectory, @"AzureResourceManager.psd1"));
}
else if (mode == AzureModule.AzureServiceManagement)
{
this.modules.Add(Path.Combine(PackageDirectory, @"ServiceManagement\Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectory, @"Azure\Azure.psd1"));
}

this.modules.Add("Assert.ps1");
Expand All @@ -272,16 +272,16 @@ public void SetupModulesFromCommon(AzureModule mode, params string[] modules)
this.modules = new List<string>();
if (mode == AzureModule.AzureProfile)
{
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"ServiceManagement\Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"AzureResourceManager.psd1"));
}
else if (mode == AzureModule.AzureServiceManagement)
{
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"ServiceManagement\Azure\Azure.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"Azure\Azure.psd1"));
}
else if (mode == AzureModule.AzureResourceManager)
{
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"ResourceManager\AzureResourceManager\AzureResourceManager.psd1"));
this.modules.Add(Path.Combine(PackageDirectoryFromCommon, @"AzureResourceManager.psd1"));
}
else
{
Expand Down
Loading