2019-10-22 16:15:52 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# Bash version 3.2+ is required for regexp
|
2013-12-25 19:43:36 +04:00
|
|
|
|
2014-09-18 05:30:09 +04:00
|
|
|
EXTS='.tar.gz .tar.bz2 .tar.xz .zip'
|
2013-12-25 19:43:36 +04:00
|
|
|
|
2019-10-22 16:15:52 +03:00
|
|
|
ver=$1
|
2019-12-25 12:02:53 +03:00
|
|
|
if [[ $ver =~ ^([1-9]\.[0-9])\.([0-9]|[1-9][0-9]|0-(preview[1-9]|rc[1-9]))$ ]]; then
|
2019-10-22 16:15:52 +03:00
|
|
|
:
|
|
|
|
else
|
|
|
|
echo $ver is not valid release version
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-12-25 19:43:36 +04:00
|
|
|
|
2019-10-22 16:15:52 +03:00
|
|
|
short=${BASH_REMATCH[1]}
|
|
|
|
echo $ver
|
|
|
|
echo $short
|
|
|
|
for ext in $EXTS; do
|
|
|
|
aws --profile ruby s3 cp s3://ftp.r-l.o/pub/tmp/ruby-$ver-draft$ext s3://ftp.r-l.o/pub/ruby/$short/ruby-$ver$ext
|
2013-12-25 19:43:36 +04:00
|
|
|
done
|