daily snapshots

This commit is contained in:
Marc Delisle
2004-04-16 19:02:45 +00:00
parent f0e765375d
commit 91c1336a07

View File

@@ -2,6 +2,10 @@
# #
# $Id$ # $Id$
# #
# 2004-04-16, lem9@users.sourceforge.net:
# - daily snapshot when called with first parameter "snapshot"
# - remove directory used for the checkout
#
# 2003-11-18, nijel@users.sourceforge.net: # 2003-11-18, nijel@users.sourceforge.net:
# - switch php3 -> php # - switch php3 -> php
# #
@@ -59,6 +63,23 @@ then
branch="-r $2" branch="-r $2"
fi fi
if [ $1 == "snapshot" ]
then
mode="snapshot"
date_snapshot=`date +%Y%m%d-%H%M%S`
fi
# Set target name
if [ "$mode" != "snapshot" ]
then
target=$1
else
target=$date_snapshot
fi
if [ "$mode" != "snapshot" ]
then
cat <<END cat <<END
@@ -85,6 +106,7 @@ read do_release
if [ "$do_release" != 'y' ]; then if [ "$do_release" != 'y' ]; then
exit exit
fi fi
fi
# Move old cvs dir # Move old cvs dir
if [ -e cvs ]; if [ -e cvs ];
@@ -94,21 +116,34 @@ fi
# Do CVS checkout # Do CVS checkout
mkdir cvs mkdir cvs
cd cvs cd cvs
if [ "$mode" != "snapshot" ]
then
echo "Press [ENTER]!" echo "Press [ENTER]!"
cvs -d:pserver:anonymous@$cvsserver:/cvsroot/phpmyadmin login cvs -q -d:pserver:anonymous@$cvsserver:/cvsroot/phpmyadmin login
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "CVS login failed, bailing out" echo "CVS login failed, bailing out"
exit 1 exit 1
fi fi
cvs -z3 -d:pserver:anonymous@$cvsserver:/cvsroot/phpmyadmin co -P $branch phpMyAdmin fi
cvs -q -z3 -d:pserver:anonymous@$cvsserver:/cvsroot/phpmyadmin co -P $branch phpMyAdmin
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo "CVS checkout failed, bailing out" echo "CVS checkout failed, bailing out"
exit 2 exit 2
fi fi
# Cleanup release dir # Cleanup release dir
LC_ALL=C date -u > phpMyAdmin/RELEASE-DATE-$1 LC_ALL=C date -u > phpMyAdmin/RELEASE-DATE-${target}
# Olivier asked to keep those in the cvs release, to allow testers to use
# cvs update on it
if [ "$mode" != "snapshot" ]
then
find phpMyAdmin \( -name .cvsignore -o -name CVS \) -print0 | xargs -0 rm -rf find phpMyAdmin \( -name .cvsignore -o -name CVS \) -print0 | xargs -0 rm -rf
fi
find phpMyAdmin -type d -print0 | xargs -0 chmod 755 find phpMyAdmin -type d -print0 | xargs -0 chmod 755
find phpMyAdmin -type f -print0 | xargs -0 chmod 644 find phpMyAdmin -type f -print0 | xargs -0 chmod 644
find phpMyAdmin \( -name '*.sh' -o -name '*.pl' \) -print0 | xargs -0 chmod 755 find phpMyAdmin \( -name '*.sh' -o -name '*.pl' \) -print0 | xargs -0 chmod 755
@@ -117,13 +152,19 @@ find phpMyAdmin \( -name '*.sh' -o -name '*.pl' \) -print0 | xargs -0 chmod 755
lynx --dont_wrap_pre --nolist --dump phpMyAdmin/Documentation.html > phpMyAdmin/Documentation.txt lynx --dont_wrap_pre --nolist --dump phpMyAdmin/Documentation.html > phpMyAdmin/Documentation.txt
# Renaming directory # Renaming directory
mv phpMyAdmin phpMyAdmin-$1 mv phpMyAdmin phpMyAdmin-$target
# Building distribution kits # Building distribution kits
zip -9 -r phpMyAdmin-$1.zip phpMyAdmin-$1 zip -9 -r phpMyAdmin-${target}.zip phpMyAdmin-${target}
tar cvf phpMyAdmin-$1.tar phpMyAdmin-$1 tar cvf phpMyAdmin-${target}.tar phpMyAdmin-${target}
bzip2 -9kv phpMyAdmin-$1.tar bzip2 -9kv phpMyAdmin-${target}.tar
gzip -9v phpMyAdmin-$1.tar gzip -9v phpMyAdmin-${target}.tar
# Cleanup
rm -rf phpMyAdmin-${target}
if [ "$mode" != "snapshot" ]
then
echo "" echo ""
@@ -149,11 +190,6 @@ ls -l --block-size=k *.{gz,zip,bz2} | sed -r "s/[a-z-]+[[:space:]]+[0-9]+[[:spac
echo echo
echo "Add these to /home/groups/p/ph/phpmyadmin/htdocs/home_page/files.inc.php on sf" echo "Add these to /home/groups/p/ph/phpmyadmin/htdocs/home_page/files.inc.php on sf"
cd ..
find cvs -type d -print0 | xargs -0 chmod 775
find cvs -type f -print0 | xargs -0 chmod 664
cat <<END cat <<END
@@ -187,6 +223,12 @@ Todo now:
END END
fi
cd ..
find cvs -type d -print0 | xargs -0 chmod 775
find cvs -type f -print0 | xargs -0 chmod 664
# Removed due to not needed thanks to clever scripting by Robbat2 # Removed due to not needed thanks to clever scripting by Robbat2
# 9. update the demo subdirectory: # 9. update the demo subdirectory:
# - in htdocs, cvs update phpMyAdmin # - in htdocs, cvs update phpMyAdmin