2019-10-22 09:15:52 -04:00
|
|
|
#!/bin/bash
|
|
|
|
# Bash version 3.2+ is required for regexp
|
2013-12-25 10:43:36 -05:00
|
|
|
|
2014-09-17 21:30:09 -04:00
|
|
|
EXTS='.tar.gz .tar.bz2 .tar.xz .zip'
|
2013-12-25 10:43:36 -05:00
|
|
|
|
2019-10-22 09:15:52 -04:00
|
|
|
ver=$1
|
2019-12-25 04:02:53 -05:00
|
|
|
if [[ $ver =~ ^([1-9]\.[0-9])\.([0-9]|[1-9][0-9]|0-(preview[1-9]|rc[1-9]))$ ]]; then
|
2019-10-22 09:15:52 -04:00
|
|
|
:
|
|
|
|
else
|
|
|
|
echo $ver is not valid release version
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-12-25 10:43:36 -05:00
|
|
|
|
2019-10-22 09:15:52 -04: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 10:43:36 -05:00
|
|
|
done
|