Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $docTitle = 'Module Repository Documentation'
- $namespaces = 'RELENG'
- $revDate = Get-Date -UFormat '%Y-%m-%d'
- $copyRightDate = Get-Date -UFormat '%Y'
- $docWebPath = 'D:\WebSites\ModuleRepository.Documentation'
- $profilePath = Split-Path $profile
- $moduleRepoVersionToDocument = 'Prod'
- $docSourceBasePath = 'D:\Dev\RelEng\ModuleRepository'
- $docSourceModulesPath = '{0}\{1}' -f $docSourceBasePath, $moduleRepoVersionToDocument
- $docSourceGeneratorPath = '{0}\Documentation' -f $docSourceBasePath
- $docGenerationInputPath = '{0}\Modules\RELENG' -f $profilePath
- $docTreeGeneratorModulePath = '{0}\Modules\DocTreeGenerator' -f $profilePath
- function Update-DocTreeModuleAndWebFiles
- {
- Copy-Item -Path ('{0}\DocTreeGenerator.psm1' -f $docSourceGeneratorPath) -Destination $docTreeGeneratorModulePath -Force
- Copy-Item -Path ('{0}\DocTreeGenerator.psd1' -f $docSourceGeneratorPath) -Destination $docTreeGeneratorModulePath -Force
- Copy-Item -Path ('{0}\psdoc_template.html' -f $docSourceGeneratorPath) -Destination $docTreeGeneratorModulePath -Force
- Copy-Item -Path ('{0}\module_overview.html' -f $docSourceGeneratorPath) -Destination $docTreeGeneratorModulePath -Force
- Import-Module DocTreeGenerator
- Copy-Item -Path ('{0}\cleancode.css' -f $docSourceGeneratorPath) -Destination $docWebPath -Force
- Copy-Item -Path ('{0}\images' -f $docSourceGeneratorPath) -Destination ('{0}\images' -f $docWebPath) -Recurse -Force
- }
- New-Item -ItemType Directory -Path $docGenerationInputPath | Out-Null
- Push-Location -Path 'D:\Dev\RelEng'
- git.exe pull
- Pop-Location
- Update-DocTreeModuleAndWebFiles
- Copy-Item -Path ('{0}\*' -f $docSourceModulesPath) -Destination $docGenerationInputPath -Recurse -Force
- Convert-HelpToHtmlTree -Namespaces $namespaces -TargetDir $docWebPath -DocTitle $docTitle -RevisionDate $revDate -Copyright $copyRightDate
- Remove-Item -Recurse -Force $docGenerationInputPath | Out-Null
Advertisement
Add Comment
Please, Sign In to add comment