Lines Matching +full:upload +full:- +full:build
3 Uploads from a VSTS release build layout to python.org
5 Given the downloaded/extracted build artifact from a release
6 build run on python.visualstudio.com, this script uploads
8 .Parameter build
9 The location on disk of the extracted build artifact.
19 Optional path besides -build to locate CHM files.
21 Optional path besides -build to locate ZIP files.
32 [Parameter(Mandatory=$true)][string]$build,
34 [string]$server="python-downloads",
45 if (-not $build) { throw "-build option is required" } variable
46 if (-not $user) { throw "-user option is required" }
48 $tools = $script:MyInvocation.MyCommand.Path | Split-Path -parent;
50 if (-not ((Test-Path "$build\win32\python-*.exe") -or (Test-Path "$build\amd64\python-*.exe"))) { variable
51 throw "-build argument does not look like a 'build' directory"
54 function find-putty-tool { in find-putty-tool()
56 $t = gcm $n -EA 0 in find-putty-tool()
57 if (-not $t) { $t = gcm ".\$n" -EA 0 } in find-putty-tool()
58 if (-not $t) { $t = gcm "${env:ProgramFiles}\PuTTY\$n" -EA 0 } in find-putty-tool()
59 if (-not $t) { $t = gcm "${env:ProgramFiles(x86)}\PuTTY\$n" -EA 0 } in find-putty-tool()
60 if (-not $t) { throw "Unable to locate $n.exe. Please put it on $PATH" } in find-putty-tool()
64 $p = gci -r "$build\python-*.exe" | `
65 ?{ $_.Name -match '^python-(\d+\.\d+\.\d+)((a|b|rc)\d+)?-.+' } | `
66 select -first 1 | `
70 " from: $build" variable
74 if (-not $skipupload) {
75 # Upload files to the server
76 $pscp = find-putty-tool "pscp"
77 $plink = find-putty-tool "plink"
79 "Upload using $pscp and $plink"
85 pushd $build variable
91 & $plink -batch $user@$server mkdir $d
92 & $plink -batch $user@$server chgrp downloads $d
93 & $plink -batch $user@$server chmod o+rx $d
94 & $pscp -batch $chm.FullName "$user@${server}:$d"
95 if (-not $?) { throw "Failed to upload $chm" }
97 $dirs = gci "$build" -Directory
110 & $pscp -batch $exe.FullName "$user@${server}:$d"
111 if (-not $?) { throw "Failed to upload $exe" }
116 & $plink -batch $user@$server mkdir $sd
117 & $plink -batch $user@$server chgrp downloads $sd
118 & $plink -batch $user@$server chmod o+rx $sd
119 & $pscp -batch $msi.FullName "$user@${server}:$sd"
120 if (-not $?) { throw "Failed to upload $msi" }
121 & $plink -batch $user@$server chgrp downloads $sd*
122 & $plink -batch $user@$server chmod g-x,o+r $sd*
126 & $plink -batch $user@$server chgrp downloads $d*
127 & $plink -batch $user@$server chmod g-x,o+r $d*
128 & $pscp -ls "$user@${server}:$d"
131 if (-not $skippurge) {
136 if (-not $skiptest) {
139 gci "$build\*-webinstall.exe" -r -File | %{ variable
140 $d = mkdir "$tests\$($_.BaseName)" -Force
141 gci $d -r -File | del
142 $ic = copy $_ $d -PassThru
144 Start-Process -wait $ic "/passive", "/layout", "$d\layout", "/log", "$d\log\install.log"
145 if (-not $?) {
146 Write-Error "Failed to validate layout of $($inst.Name)"
151 if (-not $skiphash) {
153 pushd $build variable
166 Sort-Object Name | `
167 …Format-Table Name, @{Label="MD5"; Expression={(Get-FileHash $_ -Algorithm MD5).Hash}}, Length -Aut…
168 Out-String -Width 4096