mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-22 18:32:08 +00:00
update(scripts): allow regenerating signatures without publishing new packages
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
parent
61bc6c8d32
commit
1d0c50e272
@ -136,7 +136,7 @@ done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
# check options
|
||||
if [ ${#files[@]} -eq 0 ] || [ -z "${repo}" ]; then
|
||||
if ([ ${#files[@]} -eq 0 ] && [ -z "${sign_all}" ]) || [ -z "${repo}" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
@ -177,6 +177,7 @@ if [ "${sign_all}" ]; then
|
||||
fi
|
||||
|
||||
# update the repo by adding new packages
|
||||
if ! [ ${#files[@]} -eq 0 ]; then
|
||||
for file in "${files[@]}"; do
|
||||
echo "Adding ${file}..."
|
||||
add_deb ${tmp_repo_path} ${debSuite} ${file}
|
||||
@ -197,3 +198,4 @@ done
|
||||
# sync dists
|
||||
aws s3 sync ${tmp_repo_path}/dists ${s3_bucket_repo}/dists --delete --acl public-read
|
||||
aws cloudfront create-invalidation --distribution-id ${AWS_CLOUDFRONT_DIST_ID} --paths ${cloudfront_path}/dists/*
|
||||
fi
|
||||
|
@ -71,7 +71,7 @@ while getopts ":f::r::s" opt; do
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [ ${#files[@]} -eq 0 ] || [ -z "${repo}" ]; then
|
||||
if ([ ${#files[@]} -eq 0 ] && [ -z "${sign_all}" ]) || [ -z "${repo}" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
@ -108,6 +108,7 @@ if [ "${sign_all}" ]; then
|
||||
fi
|
||||
|
||||
# update the repo by adding new packages
|
||||
if ! [ ${#files[@]} -eq 0 ]; then
|
||||
for file in "${files[@]}"; do
|
||||
echo "Adding ${file}..."
|
||||
add_rpm ${tmp_repo_path} ${file}
|
||||
@ -128,3 +129,4 @@ done
|
||||
# sync repodata
|
||||
aws s3 sync ${tmp_repo_path}/repodata ${s3_bucket_repo}/repodata --delete --acl public-read
|
||||
aws cloudfront create-invalidation --distribution-id ${AWS_CLOUDFRONT_DIST_ID} --paths ${cloudfront_path}/repodata/*
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user