From 7545d28790ab99c6b8eb401c7a221a5c85716c95 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Wed, 26 Apr 2023 07:07:54 +0200 Subject: [PATCH] Try using `chomp` instead of `chop` in the uploader --- scripts/upload-media.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upload-media.pl b/scripts/upload-media.pl index 98e88ee..f52159f 100755 --- a/scripts/upload-media.pl +++ b/scripts/upload-media.pl @@ -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 # -------------------------------------------------- -chop($git_branch); -chop($git_commit_sha); +chomp($git_branch); +chomp($git_commit_sha); print `cp -r . /tmp/$git_commit_sha` or die; @@ -21,7 +21,7 @@ print "Creating a new hashed dir in the common bucket\n"; print `rclone copy /tmp/$git_commit_sha/static "$common_bucket/$git_commit_sha"` or die; -if ( $git_branch eq $main_branch) { +if ($git_branch eq $main_branch) { print "Syncing to the production bucket\n"; print `rclone sync "$common_bucket/$git_commit_sha" "$main_bucket/"` or die; }