Skip to content

Commit 11590ce

Browse files
committed
Fix: Script version
1 parent 83f73f6 commit 11590ce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Scripts/Create-FileHash.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ if(-not (Test-Path -Path $Path -PathType Container)) {
1313
}
1414

1515
# Get current date as version
16-
$Version = (Get-Date).ToString("yyyy.MM.dd") + ".0"
16+
$now = Get-Date
17+
$Version = "$($now.Year).$($now.Month).$($now.Day).0"
1718

1819
# Create SHA256 file hashes
19-
foreach ($Hash in Get-ChildItem -Path $Path | Where-Object { $_.Name.EndsWith(".zip") -or $_.Name.EndsWith(".msi") } | Sort-Object -Descending | Get-FileHash) {
20-
"$($Hash.Algorithm) | $($Hash.Hash) | $([System.IO.Path]::GetFileName($Hash.Path))" | Out-File -FilePath "$Path\NETworkManager_$($Version)_Hash.txt" -Encoding utf8 -Append
20+
foreach ($Hash in Get-ChildItem -Path $Path | Where-Object { $_.Name.StartsWith("NETworkManager_") -and ($_.Name.EndsWith(".zip") -or $_.Name.EndsWith(".msi")) } | Sort-Object -Descending | Get-FileHash) {
21+
"$($Hash.Algorithm) | $($Hash.Hash) | $([System.IO.Path]::GetFileName($Hash.Path))" | Out-File -FilePath "$Path\NETworkManager_$($Version)_Checksums.sha256" -Encoding utf8 -Append
2122
}

0 commit comments

Comments
 (0)