You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2022/11/22 17:19:58 UTC

[arrow-adbc] branch main updated: ci: fix Windows wheel upload (#192)

This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 0cd9e76  ci: fix Windows wheel upload (#192)
0cd9e76 is described below

commit 0cd9e764b6e5de49aebc78bce8011d0e046b5dd5
Author: David Li <li...@gmail.com>
AuthorDate: Tue Nov 22 12:19:53 2022 -0500

    ci: fix Windows wheel upload (#192)
---
 ci/scripts/python_wheel_upload.ps1 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ci/scripts/python_wheel_upload.ps1 b/ci/scripts/python_wheel_upload.ps1
index 72a9cbb..82284e9 100644
--- a/ci/scripts/python_wheel_upload.ps1
+++ b/ci/scripts/python_wheel_upload.ps1
@@ -15,18 +15,24 @@
 # specific language governing permissions and limitations
 # under the License.
 
-$Uri = "https://$($env:GEMFURY_PUSH_TOKEN)@push.fury.io/arrow-adbc-nightlies/"
+$Uri = "https://push.fury.io/arrow-adbc-nightlies/"
 
 for ($i = 0; $i -lt $args.count; $i++) {
     echo "Uploading $($args[$i])"
+    $Token = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($env:GEMFURY_PUSH_TOKEN):"))
     $Form = @{
         package = Get-Item -Path $args[$i]
     }
+    $Headers = @{
+        Authorization = "Basic $($Token)"
+    }
     try {
-        Invoke-WebRequest -uri $Uri -Method Post -Form $Form
+        $Response = Invoke-WebRequest -uri $Uri -Method Post -Form $Form -Headers $Headers
+        echo "Uploaded $($args[$i])"
     } catch {
         $StatusCode = $_.Exception.Response.StatusCode.value__
         if ($StatusCode -eq 409) {
+            echo "Already uploaded $($args[$i])"
             continue
         } else {
             echo "Failed to upload: $($StatusCode) $($_.Exception)"