GHA: Generate Akamai specific nightly downloads page

This commit is contained in:
aboyko
2023-11-09 18:48:04 -05:00
parent b9b4c3a75a
commit ceeb1a5895
2 changed files with 21 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ dist_path=$1
eclipse_version=$2
build_type=$3
# Legacy S3 tool-spring-io dist.springsource.com
s3_url=s3://dist.springsource.com/${dist_path}
downloads_html="sts4-nightly-${eclipse_version}.html"
files=`aws s3 cp ${s3_url} . --recursive --exclude "*" --include "spring-tool-suite-4*.zip" --include "spring-tool-suite-4*.dmg" --include "spring-tool-suite-4*.self-extracting.jar" --include "spring-tool-suite-4*.tar.gz" --exclude "*/*" --dryrun`
@@ -17,5 +18,22 @@ do
done
echo '</ul>' >> $downloads_html
cat ./$downloads_html
aws s3 cp ./$downloads_html s3://dist.springsource.com/${build_type}/STS4/ --acl public-read --no-progress
aws s3 mv ./$downloads_html s3://dist.springsource.com/${build_type}/STS4/ --acl public-read --no-progress
# Akamai tools-spring-io bucket
s3_url=s3://spring-tools-io/${dist_path}
downloads_html="sts4-nightly-${eclipse_version}.html"
files=`aws s3 cp ${s3_url} . --recursive --exclude "*" --include "spring-tool-suite-4*.zip" --include "spring-tool-suite-4*.dmg" --include "spring-tool-suite-4*.self-extracting.jar" --include "spring-tool-suite-4*.tar.gz" --exclude "*/*" --dryrun`
rm -f ./${downloads_html}
echo '<ul>' >> $downloads_html
for file in $files
do
if [[ "$file" =~ ^"s3://spring-tools-io" ]]; then
download_url=https://cdn.spring.io/spring-tools${file:20} #
filename=${file:${#s3_url}+1}
echo ' <li><a href="'${download_url}'">'${filename}'</li>' >> $downloads_html
fi
done
echo '</ul>' >> $downloads_html
cat ./$downloads_html
aws s3 mv ./$downloads_html s3://tools-spring-io/${build_type}/STS4/ --no-progress