Skip to content

Commit

Permalink
misc: update release upload script #2
Browse files Browse the repository at this point in the history
to account for the ftp server to contain a protocol, or not.

[no ci] [skip ci]
  • Loading branch information
revam committed Mar 29, 2023
1 parent 6d6d56e commit 9614d97
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/UploadRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ Param(
$username = $env:FTP_USERNAME;
$password = $env:FTP_PASSWORD;
$ftp_server = $env:FTP_SERVER;
$localPath = (Get-Location).Path + "/" + $local
$remotePath = "ftp://$ftp_server/files/shoko-server/$remote"
$localPath = (Get-Location).Path + "/" + $local;
$remotePath = "$ftp_server/files/shoko-server/$remote";
if (!$remotePath.StartsWith("ftp://")) {
Write-Output "Adding protocol to remote path…";
$remotePath = "ftp://$remotePath";
}

# Log inputs.
Write-Output "Starting file upload...";
Expand Down

0 comments on commit 9614d97

Please sign in to comment.