mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:46:30 +00:00
fix for google drive upload script
This commit is contained in:
@@ -53,8 +53,13 @@ if ($fullZip) {
|
||||
Write-Output "[ACTION] Deleting old production builds, keeping only the newly uploaded file..."
|
||||
$uploadedFileName = $fullZip.Name
|
||||
|
||||
# Get list of files in the target folder
|
||||
$existingFiles = (rclone ls "$prodUploadFolder" --files-only) | ForEach-Object { $_.Trim() }
|
||||
# Get list of files in the target folder using rclone lsf and filter out directories
|
||||
# rclone lsf lists files and directories, with directories having a '/' suffix
|
||||
$existingFiles = (rclone lsf "$prodUploadFolder") | ForEach-Object {
|
||||
$_.Trim()
|
||||
} | Where-Object {
|
||||
-not $_.EndsWith('/')
|
||||
}
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
foreach ($fileName in $existingFiles) {
|
||||
|
||||
Reference in New Issue
Block a user