1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/release.sh
2019-12-25 18:02:53 +09:00

19 lines
437 B
Bash
Executable file

#!/bin/bash
# Bash version 3.2+ is required for regexp
EXTS='.tar.gz .tar.bz2 .tar.xz .zip'
ver=$1
if [[ $ver =~ ^([1-9]\.[0-9])\.([0-9]|[1-9][0-9]|0-(preview[1-9]|rc[1-9]))$ ]]; then
:
else
echo $ver is not valid release version
exit 1
fi
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
done