Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a486a47

Browse files
zoobamiss-islington
authored andcommitted
Fixes issues in Windows release upload script (GH-9845)
1 parent d4d6013 commit a486a47

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Tools/msi/uploadrelease.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ param(
3939
if (-not $build) { throw "-build option is required" }
4040
if (-not $user) { throw "-user option is required" }
4141

42+
$tools = $script:MyInvocation.MyCommand.Path | Split-Path -parent;
43+
4244
if (-not ((Test-Path "$build\win32\python-*.exe") -or (Test-Path "$build\amd64\python-*.exe"))) {
4345
throw "-build argument does not look like a 'build' directory"
4446
}
@@ -105,7 +107,7 @@ if (-not $skipupload) {
105107

106108
if (-not $skippurge) {
107109
# Run a CDN purge
108-
py purge.py "$($p[0])$($p[1])"
110+
py $tools\purge.py "$($p[0])$($p[1])"
109111
}
110112

111113
if (-not $skiptest) {
@@ -126,8 +128,11 @@ if (-not $skiptest) {
126128
if (-not $skiphash) {
127129
# Display MD5 hash and size of each downloadable file
128130
pushd $build
129-
gci python*.chm, *\*.exe, *\*.zip | `
131+
$hashes = gci python*.chm, *\*.exe, *\*.zip | `
130132
Sort-Object Name | `
131-
Format-Table Name, @{Label="MD5"; Expression={(Get-FileHash $_ -Algorithm MD5).Hash}}, Length
133+
Format-Table Name, @{Label="MD5"; Expression={(Get-FileHash $_ -Algorithm MD5).Hash}}, Length -AutoSize | `
134+
Out-String -Width 4096
135+
$hashes | clip
136+
$hashes
132137
popd
133138
}

0 commit comments

Comments
 (0)