mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 08:36:29 +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..."
|
Write-Output "[ACTION] Deleting old production builds, keeping only the newly uploaded file..."
|
||||||
$uploadedFileName = $fullZip.Name
|
$uploadedFileName = $fullZip.Name
|
||||||
|
|
||||||
# Get list of files in the target folder
|
# Get list of files in the target folder using rclone lsf and filter out directories
|
||||||
$existingFiles = (rclone ls "$prodUploadFolder" --files-only) | ForEach-Object { $_.Trim() }
|
# 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) {
|
if ($LASTEXITCODE -eq 0) {
|
||||||
foreach ($fileName in $existingFiles) {
|
foreach ($fileName in $existingFiles) {
|
||||||
|
|||||||
Reference in New Issue
Block a user