From 934546eb0b8c17bfe2364084d7181a8e1ce205b4 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 25 Dec 2013 15:43:36 +0000 Subject: [PATCH] add release script on ftp.r-l.o git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/release.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tool/release.sh diff --git a/tool/release.sh b/tool/release.sh new file mode 100644 index 0000000000..08f150289b --- /dev/null +++ b/tool/release.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +RUBYDIR=/home/ftp/pub/ruby + +releases=`ls ruby-*|grep -o 'ruby-[0-9]\.[0-9]\.[0-9]\(-\(preview\|rc\|p\)[0-9]\{1,4\}\)\?'|uniq` + +# check files +for r in $releases +do + echo "checking files for $r..." + if ! [ -f $r.tar.gz ];then + echo "ERROR: $r.tar.gz not found" + exit 1 + elif ! [ -f $r.tar.bz2 ];then + echo "ERROR: $r.tar.bz2 not found" + exit 1 + elif ! [ -f $r.zip ];then + echo "ERROR: $r.zip not found" + exit 1 + else + echo "files are ok" + fi +done + +# version directory +for r in $releases +do + xy=`echo $r|grep -o '[0-9]\.[0-9]'` + dir="${RUBYDIR}/$xy" + echo "$dir" + mkdir -p $dir + cp $r.tar.gz $dir/$r.tar.gz + cp $r.tar.bz2 $dir/$r.tar.bz2 + cp $r.zip $dir/$r.zip +done