fix: Upload script is working again
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nikolai Rodionov 2023-04-25 11:18:03 +02:00
parent fdbf6c4636
commit 828559a6a1
Signed by: allanger
GPG Key ID: 19DB54039EBF8F10

View File

@ -9,8 +9,8 @@ my $main_bucket = "badhouseplants-minio:/badhouseplants-net-main";
# -- I'm doing all of it because I can't undestand
# -- how not to send 300Mb to the buildah context
# --------------------------------------------------
chomp($git_branch);
chomp($git_commit_sha);
chop($git_branch);
chop($git_commit_sha);
print `cp -r . /tmp/$git_commit_sha` or die;
@ -19,9 +19,9 @@ print `git -C /tmp/$git_commit_sha lfs pull` or die;
print "Creating a new hashed dir in the common bucket\n";
print `rclone copy -P /tmp/$git_commit_sha/static "$common_bucket/$git_commit_sha"` or die;
print `rclone copy /tmp/$git_commit_sha/static "$common_bucket/$git_commit_sha"` or die;
if ( $git_branch eq $main_branch) {
print "Syncing to the production bucket\n";
print `rclone sync -P "$common_bucket/$git_commit_sha" "$main_bucket/"` or die;
print `rclone sync "$common_bucket/$git_commit_sha" "$main_bucket/"` or die;
}