3 # Automatable release steps. All are optional but default to enabled.
5 # 1. Build source packages.
6 # 2. Build Windows packages.
7 # 3. Generate announce email from NEWS file.
8 # 4. Build HTML and PDF documentation and upload to web site.
9 # 5. Create new release directory and upload packages to directory.
12 # * Need to update sourceforge for recommended package to give to each
13 # OS and send email using Mutt or similar.
14 # * Update front page of web site to point to latest files and give
17 # TODO: Can't be used for pre-releases right now.
18 # TODO: Make sure releases are tagged in cvs/git and no files remain
19 # uncommitted to make sure release is reproducable.
25 # configure must have been ran to get release #.
26 [ ! -x configure
] && autoreconf
-i
27 [ ! -f Makefile
] && .
/configure
29 release_num
=`grep Version: sox.pc | cut -d ' ' -f 2`
31 osx_zip
="sox-${release_num}-macosx.zip"
32 win_zip
="sox-${release_num}-win32.zip"
33 win_exe
="sox-${release_num}-win32.exe"
34 src_gz
="sox-${release_num}.tar.gz"
35 src_bz2
="sox-${release_num}.tar.bz2"
36 release_list
="$src_gz $src_bz2 $win_exe $win_zip $osx_zip"
38 email_list
="sox-users@lists.sourceforge.net,sox-devel@lists.sourceforge.net"
39 email_file
="sox-${release_num}.email"
41 username
="${USER},sox"
42 hostname
="shell.sourceforge.net"
43 release_path
="/home/frs/project/s/so/sox/sox"
45 web_path
="/home/project-web/sox/htdocs"
49 echo "Creating source packages..."
50 ! make -s distcheck
&& echo "distcheck failed" && exit 1
51 ! make -s dist-bzip2
&& echo "dist-bzip2 failed" && exit 1
53 echo "Creating Windows packages..."
59 if [ $update_web = "yes" ]; then
60 echo "Creating HTML documentation for web site..."
61 ! make -s html
&& echo "html failed" && exit 1
63 echo "Creating PDF documentation for web site..."
64 ! make -s pdf
&& echo "pdf failed" && exit 1
71 Subject: [ANNOUNCE] SoX ${release_num} Released
81 echo "Aborting. Should not release untracked version number."
85 echo "TODO: Upload path for RC's is different. Aborting."
90 if [ ! -f $osx_zip ]; then
91 echo "$osx_zip files not found. Place those in base directory and try again."
96 if [ $build_files = "yes" ]; then
100 if [ ! -f $src_gz -o ! -f $src_bz2 ]; then
101 echo "$src_gz or $src_bz2 not found. Rebuild and try again"
105 if [ ! -f $win_zip -o ! -f $win_exe ]; then
106 echo "$win_zip or $win_exe not found. Rebuild and try again"
110 create_email
> $email_file
112 if [ $update_web = "yes" -o $release_files = "yes" ]; then
113 echo "Creating shell on sourceforge for $username"
114 ssh ${username}@
${hostname} create
118 if [ $update_web = "yes" ]; then
119 echo "Updating web pages..."
120 # Delete only PNG filenames which have random PID #'s in them.
121 ssh ${username}@${hostname} rm -rf ${web_path}/soxpng
122 scp
-pr *.pdf
*.html soxpng
${username}@${hostname}:${web_path}
123 scp
-p Docs.Features
${username}@${hostname}:${web_path/wiki.d}
126 if [ $release_files = "yes" ]; then
127 echo "Checking for an existing release..."
128 if ssh ${username}@${hostname} ls ${release_path}/${release_num}/$src_gz >/dev
/null
2>&1; then
129 if [ "$release_force" != "yes" ]; then
130 echo "error: file already exists!"
133 ssh ${username}@${hostname} mkdir -p ${release_path}/${release_num}
134 scp
-p $release_list ${username}@${hostname}:${release_path}/${release_num}
135 scp
-p NEWS
${username}@${hostname}:${release_path}/${release_num}/README.txt