You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Also stop warning about the "Build" verb
- "Complete" the progress display after the build finishes
Merge pull request #91 from PoshCode/fix/CopyPaths
Copy file name to clipboardExpand all lines: Source/Public/Build-Module.ps1
+7-9Lines changed: 7 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,3 @@
1
-
if (!(Get-Verb Build) -and$MyInvocation.Line-notmatch"DisableNameChecking") {
2
-
Write-Warning"The verb 'Build' was approved recently, but PowerShell $($PSVersionTable.PSVersion.Major).$($PSVersionTable.PSVersion.Minor) doesn't know. You will be warned about Build-Module."
3
-
}
4
-
5
1
functionBuild-Module {
6
2
<#
7
3
.Synopsis
@@ -17,7 +13,7 @@ function Build-Module {
17
13
The optimization process:
18
14
1. The OutputDirectory is created
19
15
2. All psd1/psm1/ps1xml files (except build.psd1) in the Source will be copied to the output
20
-
3. If specified, $CopyDirectories (relative to the Source) will be copied to the output
16
+
3. If specified, $CopyPaths (relative to the Source) will be copied to the output
21
17
4. The ModuleName.psm1 will be generated (overwritten completely) by concatenating all .ps1 files in the $SourceDirectories subdirectories
22
18
5. The ModuleVersion and ExportedFunctions in the ModuleName.psd1 may be updated (depending on parameters)
23
19
@@ -88,7 +84,8 @@ function Build-Module {
88
84
# Folders which should be copied intact to the module output
89
85
# Can be relative to the module folder
90
86
[AllowEmptyCollection()]
91
-
[string[]]$CopyDirectories=@(),
87
+
[Alias("CopyDirectories")]
88
+
[string[]]$CopyPaths=@(),
92
89
93
90
# Folders which contain source .ps1 scripts to be concatenated into the module
94
91
# Defaults to Enum, Classes, Private, Public
@@ -194,9 +191,9 @@ function Build-Module {
194
191
Write-Verbose"Copy files to $OutputDirectory"
195
192
# Copy the files and folders which won't be processed
0 commit comments