mirror of
https://github.com/cmderdev/cmder.git
synced 2025-03-13 06:04:36 +08:00
respect powershell naming convention
This commit is contained in:
parent
624deec2f0
commit
93d2c427ad
@ -65,7 +65,7 @@ Push-Location -Path $saveTo
|
|||||||
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
|
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
|
||||||
|
|
||||||
# Get the version string
|
# Get the version string
|
||||||
$Version = Get-Version-Str ($PSScriptRoot + '\..\' + 'CHANGELOG.md')
|
$Version = Get-VersionStr ($PSScriptRoot + '\..\' + 'CHANGELOG.md')
|
||||||
|
|
||||||
# Check for requirements
|
# Check for requirements
|
||||||
Ensure-Exists $sourcesPath
|
Ensure-Exists $sourcesPath
|
||||||
|
@ -62,7 +62,7 @@ function Digest-Hash($path) {
|
|||||||
return Invoke-Expression "md5sum $path"
|
return Invoke-Expression "md5sum $path"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-Version-Str($file) {
|
function Get-VersionStr($file) {
|
||||||
|
|
||||||
# Define the regular expression to match the version string from changelog
|
# Define the regular expression to match the version string from changelog
|
||||||
[regex]$regex = '^## \[(?<version>[\w\-\.]+)\]\([^\n()]+\)\s+\([^\n()]+\)$';
|
[regex]$regex = '^## \[(?<version>[\w\-\.]+)\]\([^\n()]+\)\s+\([^\n()]+\)$';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user