GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ModuleBuilder/build.ps1 at master · frstlvl/ModuleBuilder Expand file tree/ Copy pathbuild.ps1More file actions 52 lines (43 loc) · 1.84 KB / Copy pathbuild.ps1File metadata and controls52 lines (43 loc) · 1.84 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 #requires -Module Configuration <# .Synopsis This is just a bootstrapping build, for when ModuleBuilder can't be used to build ModuleBuilder #> [CmdletBinding()] param( # A specific folder to build into $OutputDirectory, # The version of the output module [Alias("ModuleVersion")] [string]$SemVer ) # Sanitize parameters to pass to Build-Module $null = $PSBoundParameters.Remove('Test') if (-not $Semver) { if ($semver = gitversion -showvariable SemVer) { $null = $PSBoundParameters.Add("SemVer", $SemVer) } } $ErrorActionPreference = "Stop" Push-Location $PSScriptRoot -StackName BuildBuildModule try { # Build ModuleBuilder with ModuleBuilder: Write-Verbose "Compiling ModuleBuilderBootstrap module" $OFS = "`n`n" $Source = Get-ChildItem Source -File -Recurse -Filter *.ps1 | Sort-Object DirectoryName, Name | Get-Content -Encoding UTF8 -Delimiter ([char]0) $Source += "`nExport-ModuleMember -Function *-*" Get-Module ModuleBuilderBootstrap -ErrorAction Ignore | Remove-Module New-Module ModuleBuilderBootstrap ([ScriptBlock]::Create($Source)) | Import-Module -Verbose:$false -DisableNameChecking # Build new output $ParameterString = $PSBoundParameters.GetEnumerator().ForEach{ '-' + $_.Key + " '" + $_.Value + "'" } -join " " Write-Verbose "Build-Module Source\build.psd1 $($ParameterString) -Target CleanBuild" ModuleBuilderBootstrap\Build-Module Source\build.psd1 @PSBoundParameters -Target CleanBuild -Passthru -OutVariable BuildOutput | Split-Path Write-Verbose "Module build output in $(Split-Path $BuildOutput.Path)" # Clean up environment Remove-Module ModuleBuilderBootStrap -ErrorAction SilentlyContinue -Verbose:$false } finally { Pop-Location -StackName BuildBuildModule } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |