File tree Expand file tree Collapse file tree 2 files changed +15
-17
lines changed Expand file tree Collapse file tree 2 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ foreach ($file in $files)
42
42
43
43
$version = (Get-ChildItem $targetDir \PSReadline.dll).VersionInfo.FileVersion
44
44
45
- Update-ModuleManifest $targetDir \PSReadline.psd1 $version
45
+ & $PSScriptRoot \Update-ModuleManifest.ps1 $targetDir \PSReadline.psd1 $version
46
+
46
47
47
48
del $PSScriptRoot \PSReadline.zip - ea Ignore
48
49
[System.IO.Compression.ZipFile ]::CreateFromDirectory($targetDir , " $PSScriptRoot \PSReadline.zip" )
Original file line number Diff line number Diff line change
1
+ param (
2
+ [Parameter (Mandatory = $TRUE )]
3
+ [String ] $FilePath ,
4
+ [Parameter (Mandatory = $TRUE )]
5
+ [String ] $Version
6
+ )
1
7
2
- function Update-ModuleManifest {
3
- param (
4
- [Parameter (Mandatory = $TRUE )]
5
- [String ] $FilePath ,
6
- [Parameter (Mandatory = $TRUE )]
7
- [String ] $Version
8
- )
9
-
10
- if ((Test-Path $FilePath - PathType Leaf) -ne $TRUE ) {
8
+ if ((Test-Path $FilePath - PathType Leaf) -ne $TRUE ) {
11
9
Write-Error - Message ($FilePath + ' not found.' ) - Category InvalidArgument;
12
10
exit 1 ;
13
- }
11
+ }
14
12
15
- # normalize path
16
- $FilePath = (Resolve-Path $FilePath ).Path;
13
+ # normalize path
14
+ $FilePath = (Resolve-Path $FilePath ).Path;
17
15
18
- $moduleVersionPattern = " ModuleVersion = '.*'" ;
19
- $newVersion = " ModuleVersion = '" + $Version + " '" ;
16
+ $moduleVersionPattern = " ModuleVersion = '.*'" ;
17
+ $newVersion = " ModuleVersion = '" + $Version + " '" ;
20
18
21
- (Get-Content $FilePath ) | % {$_ -replace $moduleVersionPattern , $newVersion } | Set-Content $FilePath ;
22
- }
19
+ (Get-Content $FilePath ) | % {$_ -replace $moduleVersionPattern , $newVersion } | Set-Content $FilePath ;
You can’t perform that action at this time.
0 commit comments