File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 6666 [string ] $moduleManifestFilePath = " $moduleDirectoryPath \__NewModuleName__.psd1"
6767 [string ] $moduleTestsFilePath = " $moduleDirectoryPath \__NewModuleName__.Tests.ps1"
6868
69- if (Test-Path - Path $moduleDirectoryPath - PathType Container)
70- {
71- Rename-Item - Path $moduleDirectoryPath - NewName $moduleName - Force
72- }
73-
7469 if (Test-Path - Path $moduleFilePath - PathType Leaf)
7570 {
7671 Rename-Item - Path $moduleFilePath - NewName " $moduleName .psm1" - Force
@@ -85,11 +80,17 @@ Begin
8580 {
8681 Rename-Item - Path $moduleTestsFilePath - NewName " $moduleName .Tests.ps1" - Force
8782 }
83+
84+ # Rename the directory last.
85+ if (Test-Path - Path $moduleDirectoryPath - PathType Container)
86+ {
87+ Rename-Item - Path $moduleDirectoryPath - NewName $moduleName - Force
88+ }
8889 }
8990
9091 function Set-TemplateTokenValuesInAllRepoFiles ([string ] $moduleName , [string ] $organizationName )
9192 {
92- $repositoryFiles = Get-ChildItem - Path $RepositoryRoot - Recurse - File
93+ $repositoryFiles = Get-ChildItem - Path $RepositoryRoot - Recurse - File - Exclude ' _InitializeRepository.ps1 '
9394 foreach ($file in $repositoryFiles )
9495 {
9596 $filePath = $file.FullName
You can’t perform that action at this time.
0 commit comments