mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Prevent upload script uploading from the wrong directory (GH-7953)
This commit is contained in:
		
							parent
							
								
									4a8b037d2b
								
							
						
					
					
						commit
						74e4aee549
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
					@ -39,6 +39,10 @@ param(
 | 
				
			||||||
if (-not $build) { throw "-build option is required" }
 | 
					if (-not $build) { throw "-build option is required" }
 | 
				
			||||||
if (-not $user) { throw "-user 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 {
 | 
					function find-putty-tool {
 | 
				
			||||||
    param ([string]$n)
 | 
					    param ([string]$n)
 | 
				
			||||||
    $t = gcm $n -EA 0
 | 
					    $t = gcm $n -EA 0
 | 
				
			||||||
| 
						 | 
					@ -57,7 +61,6 @@ $p = gci -r "$build\python-*.exe" | `
 | 
				
			||||||
"Uploading version $($p[0]) $($p[1])"
 | 
					"Uploading version $($p[0]) $($p[1])"
 | 
				
			||||||
"  from: $build"
 | 
					"  from: $build"
 | 
				
			||||||
"    to: $($server):$target/$($p[0])"
 | 
					"    to: $($server):$target/$($p[0])"
 | 
				
			||||||
" using: $plink and $pscp"
 | 
					 | 
				
			||||||
""
 | 
					""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (-not $skipupload) {
 | 
					if (-not $skipupload) {
 | 
				
			||||||
| 
						 | 
					@ -65,6 +68,9 @@ if (-not $skipupload) {
 | 
				
			||||||
    $pscp = find-putty-tool "pscp"
 | 
					    $pscp = find-putty-tool "pscp"
 | 
				
			||||||
    $plink = find-putty-tool "plink"
 | 
					    $plink = find-putty-tool "plink"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    "Upload using $pscp and $plink"
 | 
				
			||||||
 | 
					    ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pushd $build
 | 
					    pushd $build
 | 
				
			||||||
    $doc = gci python*.chm, python*.chm.asc
 | 
					    $doc = gci python*.chm, python*.chm.asc
 | 
				
			||||||
    popd
 | 
					    popd
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue