File tree Expand file tree Collapse file tree 1 file changed +10
-20
lines changed
Expand file tree Collapse file tree 1 file changed +10
-20
lines changed Original file line number Diff line number Diff line change 11# Requires -Modules GitHub
22
33[CmdletBinding ()]
4- param (
5- [Parameter ()]
6- [string ] $Subject = $env :< ORG_NAME> _ < REPO_NAME> _INPUT_subject
7- )
8-
9- begin {
10- $scriptName = $MyInvocation.MyCommand.Name
11- Write-Debug " [$scriptName ] - Start"
12- }
13-
14- process {
15- try {
16- Write-Output " Hello, $Subject !"
17- } catch {
18- throw $_
19- }
20- }
21-
22- end {
23- Write-Debug " [$scriptName ] - End"
4+ param ()
5+
6+ $PSModulePath = $env: PSModulePath -split [System.IO.Path ]::PathSeparator | Select-Object - First 1
7+ Remove-Module - Name Helpers - Force - ErrorAction SilentlyContinue
8+ Get-Command - Module Helpers | ForEach-Object { Remove-Item - Path function:$_ - Force }
9+ Get-Item - Path " $PSModulePath /Helpers/999.0.0" | Remove-Item - Recurse - Force
10+ $modulePath = New-Item - Path " $PSModulePath /Helpers/999.0.0" - ItemType Directory - Force | Select-Object - ExpandProperty FullName
11+ Copy-Item - Path " $PSScriptRoot /Helpers/*" - Destination $modulePath - Recurse - Force
12+ LogGroup ' Importing module' {
13+ Import-Module - Name Helpers - Verbose
2414}
You can’t perform that action at this time.
0 commit comments