Skip to content

Commit

Permalink
[GHA] Fix gen download page script
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex committed Jul 11, 2024
1 parent 05a8e16 commit 7e703c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/update-distro-download-page.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ 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
s3_url_prefix="s3://${AWS_S3_BUCKET}"
s3_url_prefix_length=${#s3_url_prefix}
for file in $files
do
if [[ "$file" =~ ^"s3://${s3_bucket}" ]]; then
download_url=${download_url_root}${file:20} #
if [[ "$file" =~ ^"${s3_url_prefix}" ]]; then
download_url=${download_url_root}${file:$s3_url_prefix_length} #
filename=${file:${#s3_url}+1}
echo ' <li><a href="'${download_url}'">'${filename}'</li>' >> $downloads_html
fi
Expand Down

0 comments on commit 7e703c7

Please sign in to comment.