summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2018-06-27 15:11:13 (GMT)
committerGitHub <noreply@github.com>2018-06-27 15:11:13 (GMT)
commit74e4aee54982bf8b3d1d1cdce965cf0e03e88e34 (patch)
tree1c005a6b23df9dd9ab056af15686a115363d50ca /Tools
parent4a8b037d2b9c7199890bc5a01b3a40687a5ce2b1 (diff)
downloadcpython-74e4aee54982bf8b3d1d1cdce965cf0e03e88e34.zip
cpython-74e4aee54982bf8b3d1d1cdce965cf0e03e88e34.tar.gz
cpython-74e4aee54982bf8b3d1d1cdce965cf0e03e88e34.tar.bz2
Prevent upload script uploading from the wrong directory (GH-7953)
Diffstat (limited to 'Tools')
-rw-r--r--Tools/msi/uploadrelease.ps18
1 files changed, 7 insertions, 1 deletions
diff --git a/Tools/msi/uploadrelease.ps1 b/Tools/msi/uploadrelease.ps1
index 6dcd752..3e01d1e 100644
--- a/Tools/msi/uploadrelease.ps1
+++ b/Tools/msi/uploadrelease.ps1
@@ -39,6 +39,10 @@ param(
if (-not $build) { throw "-build option is required" }
if (-not $user) { throw "-user option is required" }
+if (-not ((Test-Path "$build\win32\python-*.exe") -or (Test-Path "$build\amd64\python-*.exe"))) {
+ throw "-build argument does not look like a 'build' directory"
+}
+
function find-putty-tool {
param ([string]$n)
$t = gcm $n -EA 0
@@ -57,7 +61,6 @@ $p = gci -r "$build\python-*.exe" | `
"Uploading version $($p[0]) $($p[1])"
" from: $build"
" to: $($server):$target/$($p[0])"
-" using: $plink and $pscp"
""
if (-not $skipupload) {
@@ -65,6 +68,9 @@ if (-not $skipupload) {
$pscp = find-putty-tool "pscp"
$plink = find-putty-tool "plink"
+ "Upload using $pscp and $plink"
+ ""
+
pushd $build
$doc = gci python*.chm, python*.chm.asc
popd