Skip to content

Commit fc59a7e

Browse files
committed
Fixes to structure for alias script
1 parent 301cfe0 commit fc59a7e

File tree

4 files changed

+16
-27
lines changed

4 files changed

+16
-27
lines changed

setup/azurecmdfiles.wxi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
<Component Id="cmp96F13C307DA6E4AAC35F3D147F21553F" Guid="*">
88
<File Id="fil96C82365E5F5A2F2747805236B563DF0" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureResourceManager.psd1" />
99
</Component>
10-
<Component Id="cmp776CBDE4A45F540A1D4E5132982535D7" Guid="*">
11-
<File Id="fil0AA02CF142986492F46DD199475B02AB" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\ResourceManagerStartup.ps1" />
12-
</Component>
1310
<Directory Id="dir838549562B6DA27CC3A67DA6EBDE4786" Name="ApiManagement">
1411
<Component Id="cmp53976CD68EB95B394DA506B39428339E" Guid="*">
1512
<File Id="fil540FB86D847BB7ADE837FAFDE045F1E8" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\ApiManagement\AutoMapper.dll" />
@@ -1308,6 +1305,9 @@
13081305
<Component Id="cmp81ACE07255D539B22EAAE5C07BF9C6B7" Guid="*">
13091306
<File Id="fil20BBB718A749C1E485E5AAC0700CB59C" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Resources\Newtonsoft.Json.dll" />
13101307
</Component>
1308+
<Component Id="cmpDFC57AA22185F7BE5A0D339D4F355546" Guid="*">
1309+
<File Id="filF75685E98A8F3C8E4F5DDEC6E8C70B65" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Resources\ResourceManagerStartup.ps1" />
1310+
</Component>
13111311
<Component Id="cmp5B024A4E29BF400F1ED3DE2CE1F2E0DD" Guid="*">
13121312
<File Id="filBDA4AC7C21781E73732383C29552E770" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Resources\System.Net.Http.Extensions.dll" />
13131313
</Component>
@@ -3825,7 +3825,6 @@
38253825
<Fragment>
38263826
<ComponentGroup Id="azurecmdfiles">
38273827
<ComponentRef Id="cmp96F13C307DA6E4AAC35F3D147F21553F" />
3828-
<ComponentRef Id="cmp776CBDE4A45F540A1D4E5132982535D7" />
38293828
<ComponentRef Id="cmp53976CD68EB95B394DA506B39428339E" />
38303829
<ComponentRef Id="cmp3A19AB52120FEF083E8B5C9847509286" />
38313830
<ComponentRef Id="cmp0A225313105F55FD24E961F72B00EB14" />
@@ -4241,6 +4240,7 @@
42414240
<ComponentRef Id="cmpF750706356EAB58C8C81ED96B57288C8" />
42424241
<ComponentRef Id="cmp607260D321DBB6DC85249332ACCCDF1E" />
42434242
<ComponentRef Id="cmp81ACE07255D539B22EAAE5C07BF9C6B7" />
4243+
<ComponentRef Id="cmpDFC57AA22185F7BE5A0D339D4F355546" />
42444244
<ComponentRef Id="cmp5B024A4E29BF400F1ED3DE2CE1F2E0DD" />
42454245
<ComponentRef Id="cmp997A920A652163E94E56A412D2BEC28C" />
42464246
<ComponentRef Id="cmp353F25E254A7722E3CADF046790D3C4D" />

src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ CmdletsToExport = '*'
108108
VariablesToExport = '*'
109109

110110
# Aliases to export from this module
111-
AliasesToExport = '*'
111+
AliasesToExport = @(
112+
'Get-AzureSqlDatabaseServerAuditingPolicy',
113+
'Remove-AzureSqlDatabaseServerAuditing',
114+
'Set-AzureSqlDatabaseServerAuditingPolicy',
115+
'Use-AzureSqlDatabaseServerAuditingPolicy'
116+
)
112117

113118
# List of all modules packaged with this module
114119
ModuleList = @()

src/ResourceManager/Resources/Commands.Resources/PostBuild.ps1

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,4 @@ if (Test-Path -Path $sourcePath) {
3030
Remove-Item -Path $sourcePath -Force;
3131
}
3232

33-
$sourcePath = $sourceDir + "ResourceManagerStartup.ps1"
34-
$destDir = Split-Path -Path $sourceDir
35-
36-
if (Test-Path -Path $sourcePath) {
37-
Write-Output -InputObject "Copying '$sourcePath' to directory '$destDir'";
38-
Copy-Item -Path $sourcePath -Destination $destDir;
39-
}
40-
41-
if (Test-Path -Path $sourcePath) {
42-
Write-Output "Removing $sourcePath";
43-
Remove-Item -Path $sourcePath -Force;
44-
}
45-
4633
Write-Output -InputObject 'Finished post-build script';

src/ResourceManager/Resources/Commands.Resources/ResourceManagerStartup.ps1

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15-
16-
$aliases = @{
15+
@{
1716
# Sql aliases
18-
"Get-AzureSqlDatabaseServerAuditingPolicy"="Get-AzureSqlServerAuditingPolicy";
19-
"Remove-AzureSqlDatabaseServerAuditing"="Remove-AzureSqlServerAuditing";
20-
"Set-AzureSqlDatabaseServerAuditingPolicy"="Set-AzureSqlServerAuditingPolicy";
21-
"Use-AzureSqlDatabaseServerAuditingPolicy"="Use-AzureSqlServerAuditingPolicy";
22-
}
23-
24-
$aliases.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"
17+
"Get-AzureSqlDatabaseServerAuditingPolicy" = "Get-AzureSqlServerAuditingPolicy";
18+
"Remove-AzureSqlDatabaseServerAuditing" = "Remove-AzureSqlServerAuditing";
19+
"Set-AzureSqlDatabaseServerAuditingPolicy" = "Set-AzureSqlServerAuditingPolicy";
20+
"Use-AzureSqlDatabaseServerAuditingPolicy" = "Use-AzureSqlServerAuditingPolicy";
21+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | New-Alias -Description "AzureAlias"

0 commit comments

Comments
 (0)