don't create archive with the root folder prefix

This commit is contained in:
David Refoua 2022-10-15 03:44:15 +03:30 committed by GitHub
parent 4b8d669d01
commit 2dc5463c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,6 +47,8 @@ $targets = @{
"cmder_mini.zip" = "-x!`"$cmderRoot\vendor\git-for-windows`"";
}
Push-Location -Path $cmderRoot
Delete-Existing "$cmderRoot\Version*"
Delete-Existing "$cmderRoot\build\*"
@ -66,7 +68,9 @@ if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
}
foreach ($t in $targets.GetEnumerator()) {
Create-Archive $cmderRoot "$saveTo\$($t.Name)" $t.Value
Create-Archive "$cmderRoot\*" "$saveTo\$($t.Name)" $t.Value
$hash = (Digest-Hash "$saveTo\$($t.Name)")
Add-Content -path "$saveTo\hashes.txt" -value ($t.Name + ' ' + $hash)
}
Pop-Location