File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments