From 61bc6c8d322bc562e114e786ab638a19e189b5b5 Mon Sep 17 00:00:00 2001 From: Jason Dellaluce Date: Thu, 19 Jan 2023 08:38:37 +0000 Subject: [PATCH] update(scripts): sync regenerated signatures in s3 Signed-off-by: Jason Dellaluce --- scripts/publish-deb | 7 ++++++- scripts/publish-rpm | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/publish-deb b/scripts/publish-deb index ef7755cb..be99e8b7 100755 --- a/scripts/publish-deb +++ b/scripts/publish-deb @@ -164,8 +164,13 @@ if [ "${sign_all}" ]; then for file in ${tmp_repo_path}/${debSuite}/*; do if [ -f "$file" ]; then # exclude directories, symlinks, etc... if [[ ! $file == *.asc ]]; then # exclude signature files - echo "Signing ${file}..." + package=$(basename -- ${file}) + echo "Signing ${package}..." sign_deb ${tmp_repo_path} ${debSuite} ${file} + + echo "Synching ${package}.asc to ${s3_bucket_repo}..." + aws s3 sync ${tmp_repo_path}/${debSuite}/${package}.asc ${s3_bucket_repo}/${debSuite}/${package}.asc --delete ---acl public-read + aws cloudfront create-invalidation --distribution-id ${AWS_CLOUDFRONT_DIST_ID} --paths ${cloudfront_path}/${debSuite}/${package}.asc fi fi done diff --git a/scripts/publish-rpm b/scripts/publish-rpm index e73fcc88..6a556803 100755 --- a/scripts/publish-rpm +++ b/scripts/publish-rpm @@ -95,8 +95,13 @@ if [ "${sign_all}" ]; then for file in ${tmp_repo_path}/*; do if [ -f "$file" ]; then # exclude directories, symlinks, etc... if [[ ! $file == *.asc ]]; then # exclude signature files - echo "Signing ${file}..." + package=$(basename -- ${file}) + echo "Signing ${package}..." sign_rpm ${tmp_repo_path} ${file} + + echo "Synching ${package}.asc to ${s3_bucket_repo}..." + aws s3 sync ${tmp_repo_path}/${package}.asc ${s3_bucket_repo}/${package}.asc --delete ---acl public-read + aws cloudfront create-invalidation --distribution-id ${AWS_CLOUDFRONT_DIST_ID} --paths ${cloudfront_path}/${package}.asc fi fi done