Skip to content

Commit 44bcb6f

Browse files
author
Maddie Clayton
authored
Merge pull request Azure#5765 from maddieclayton/rstest
Fix RecoveryServices build issue
2 parents 94b3472 + daa9a47 commit 44bcb6f

File tree

14 files changed

+19
-1
lines changed

14 files changed

+19
-1
lines changed

src/ResourceManager/AnalysisServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with cleaning up scripts in build
2122

2223
## Version 0.6.4
2324
* Fixed issue with importing aliases

src/ResourceManager/Cdn/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with cleaning up scripts in build
2122

2223
## Version 4.2.0
2324
* Fixed issue with importing aliases

src/ResourceManager/OperationalInsights/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with cleaning up scripts in build
2122

2223
## Version 4.3.0
2324
* Fixed issue with importing aliases

src/ResourceManager/RecoveryServices.Backup/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with cleaning up scripts in build
2122

2223
## Version 4.1.0
2324
* Added ResourceGroup Completer to -ResourceGroup parameters allowing tab completion through resource groups in current subscription

src/ResourceManager/RecoveryServices.SiteRecovery/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with cleaning up scripts in build
2122

2223
## Version 0.2.2
2324
* Fixed issue with importing aliases

src/ResourceManager/Sql/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed issue with cleaning up scripts in build
2122

2223
## Version 4.3.0
2324
* Fixed issue with importing aliases

src/ResourceManager/Websites/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020
## Current Release
2121
* Fixed the help for Remove-AzureRmWebAppSlot
22+
* Fixed issue with cleaning up scripts in build
2223

2324
## Version 4.2.0
2425
* Fixed issue with importing aliases

tools/CleanupBuild.ps1

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,15 @@ foreach ($RMFolder in $resourceManagerFolders)
4343
Write-Verbose "Removing redundant dlls in $($RMFolder.Name)"
4444
$removedDlls = Get-ChildItem -Path $RMFolder.FullName -Filter "*.dll" | where { $acceptedDlls -notcontains $_.Name}
4545
$removedDlls | % { Write-Verbose "Removing $($_.Name)"; Remove-Item $_.FullName -Force }
46-
}
46+
47+
Write-Verbose "Removing scripts and psd1 in $($RMFolder.FullName)"
48+
if (Test-Path -Path "$($RMFolder.FullName)\StartupScripts")
49+
{
50+
$scriptName = "$($RMFolder.FullName)\StartupScripts\$($RMFolder.Name.replace('.', ''))Startup.ps1"
51+
Write-Verbose $scriptName
52+
$removedScripts = Get-ChildItem -Path "$($RMFolder.FullName)\StartupScripts" -Filter "*.ps1" | where { $_.FullName -ne $scriptName }
53+
$removedScripts | % { Write-Verbose "Removing $($_.FullName)"; Remove-Item $_.FullName -Force }
54+
}
55+
$removedPsd1 = Get-ChildItem -Path "$($RMFolder.FullName)" -Filter "*.psd1" | where { $_.FullName -ne "$($RMFolder.FullName)\$($RMFolder.Name).psd1" }
56+
$removedPsd1 | % { Write-Verbose "Removing $($_.FullName)"; Remove-Item $_.FullName -Force }
57+
}

0 commit comments

Comments
 (0)