viewvc-4intranet/tools/make-release

92 lines
2.3 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/sh
#
# Copyright (C) 1999-2013 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
Work on issue 168, s/ViewCVS/ViewVC. This patch changes references to ViewCVS in comments, strings, and documentation. References to ViewCVS in filenames and urls still need to be fixed. Also, logo.png (the blimp) needs to be updated or replaced. This patch is by Gerard Gerritsen (sigcafe), the only change I've made is to restore a reference to ViewCVS in a comment about backwards compatibility. * windows/README * viewcvs-install * README * templates/include/footer.ezt * templates/include/header.ezt * templates/error.ezt * templates/query.ezt * templates/docroot/help.css * templates/docroot/help_query.html * templates/docroot/help_dirview.html * templates/docroot/help_rootview.html * templates/docroot/styles.css * templates/docroot/help_log.html * templates/diff.ezt * tools/make-release * lib/sapi.py * lib/dbi.py * lib/accept.py * lib/cvsdb.py * lib/config.py * lib/query.py * lib/vclib/bincvs/__init__.py * lib/vclib/svn/__init__.py * lib/vclib/__init__.py * lib/vclib/svn_ra/__init__.py * lib/vclib/ccvs/rcsparse/common.py * lib/vclib/ccvs/rcsparse/__init__.py * lib/vclib/ccvs/rcsparse/default.py * lib/vclib/ccvs/rcsparse/texttools.py * lib/vclib/ccvs/rcsparse/debug.py * lib/vclib/ccvs/__init__.py * lib/vclib/ccvs/blame.py * lib/blame.py * lib/popen.py * lib/compat.py * lib/viewcvs.py * lib/debug.py * INSTALL * bin/standalone.py * bin/make-database * bin/mod_python/query.py * bin/mod_python/viewcvs.py * bin/cgi/query.cgi * bin/cgi/viewcvs.cgi * bin/asp/query.asp * bin/asp/viewcvs.asp * bin/svndbadmin * bin/loginfo-handler * bin/cvsdbadmin * viewcvs.conf.dist git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1200 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-17 20:19:28 +03:00
# the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html.
#
# For more information, visit http://viewvc.org/
#
# -----------------------------------------------------------------------
#
Work on issue 168, s/ViewCVS/ViewVC. This patch changes references to ViewCVS in comments, strings, and documentation. References to ViewCVS in filenames and urls still need to be fixed. Also, logo.png (the blimp) needs to be updated or replaced. This patch is by Gerard Gerritsen (sigcafe), the only change I've made is to restore a reference to ViewCVS in a comment about backwards compatibility. * windows/README * viewcvs-install * README * templates/include/footer.ezt * templates/include/header.ezt * templates/error.ezt * templates/query.ezt * templates/docroot/help.css * templates/docroot/help_query.html * templates/docroot/help_dirview.html * templates/docroot/help_rootview.html * templates/docroot/styles.css * templates/docroot/help_log.html * templates/diff.ezt * tools/make-release * lib/sapi.py * lib/dbi.py * lib/accept.py * lib/cvsdb.py * lib/config.py * lib/query.py * lib/vclib/bincvs/__init__.py * lib/vclib/svn/__init__.py * lib/vclib/__init__.py * lib/vclib/svn_ra/__init__.py * lib/vclib/ccvs/rcsparse/common.py * lib/vclib/ccvs/rcsparse/__init__.py * lib/vclib/ccvs/rcsparse/default.py * lib/vclib/ccvs/rcsparse/texttools.py * lib/vclib/ccvs/rcsparse/debug.py * lib/vclib/ccvs/__init__.py * lib/vclib/ccvs/blame.py * lib/blame.py * lib/popen.py * lib/compat.py * lib/viewcvs.py * lib/debug.py * INSTALL * bin/standalone.py * bin/make-database * bin/mod_python/query.py * bin/mod_python/viewcvs.py * bin/cgi/query.cgi * bin/cgi/viewcvs.cgi * bin/asp/query.asp * bin/asp/viewcvs.asp * bin/svndbadmin * bin/loginfo-handler * bin/cvsdbadmin * viewcvs.conf.dist git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1200 8cb11bc2-c004-0410-86c3-e597b4017df7
2005-12-17 20:19:28 +03:00
# make-release: internal tool for creating ViewVC releases
#
# -----------------------------------------------------------------------
#
### Validate input
if test $# != 2 && test $# != 1; then
echo "Usage: $0 TARGET-DIRECTORY [BRANCH]"
echo ""
echo "If BRANCH (i.e. \"tags/1.1.0\" or \"branches/1.0.x\") is not provided,"
echo "the release will be rolled from trunk."
exit 1
fi
TARGET=${1}
if test $# = 1; then
ROOT=trunk
else
ROOT=${2}
fi
if test -e ${TARGET}; then
echo "ERROR: must remove ${TARGET} first."
exit 1
fi
### Grab an export from the Subversion repository.
EXPORT_URL="http://viewvc.tigris.org/svn/viewvc/${ROOT}"
echo "Exporting '${EXPORT_URL}' into '${TARGET}'"
for PLATFORM in unix windows; do
if test ${PLATFORM} = windows; then
EOL="--native-eol CRLF"
else
EOL="--native-eol LF"
fi
echo "Beginning build for ${PLATFORM}:"
echo " Exporting source code..."
svn export --quiet ${EOL} ${EXPORT_URL} ${TARGET}
### Various shifting, cleanup.
# Remove some not useful directories
for JUNK in elemx \
Wow. Drop a "general code cleanup" kind of bomb on the codebase. All of this is aimed at not paying the maintenance price of supporting Python versions prior to 2.4 any longer, plus a little bit of just getting dead code out of the way. * lib/compat.py Remove as unused. * bin/cvsdbadmin, * bin/loginfo-handler, * bin/make-database, * bin/svndbadmin, * lib/accept.py, * lib/blame.py, * lib/cvsdb.py, * lib/popen.py, * lib/query.py, * lib/sapi.py, * lib/vcauth/forbidden/__init__.py * lib/vcauth/forbiddenre/__init__.py, * lib/vcauth/svnauthz/__init__.py, * lib/vclib/__init__.py, * lib/vclib/ccvs/blame.py, * lib/win32popen.py, * tests/timelog.py Replace explicit import and use of the 'string' module with newer constructs. * bin/standalone.py, * lib/viewvc.py No longer use 'compat' module. Replace explicit import and use of the 'string' module with newer constructs. * lib/dbi.py Use calender.timegm() instead of compat.timegm(). * lib/vcauth/__init__.py Lose unused module imports. * lib/config.py, Replace explicit import and use of the 'string' module with newer constructs where possible. Lose old ConfigParser patch-up code for Python 1.5.1. * lib/vclib/ccvs/ccvs.py Replace explicit import and use of the 'string' module with newer constructs where possible. Import _path_join() from bincvs, and use it instead of a bunch of copy-and-pasted string join() statements throughout. * lib/vclib/ccvs/__init__.py (cvs_strptime): Moved here from the 'compat' module. * lib/vclib/ccvs/bincvs.py (): No longer use 'compat' module. Replace explicit import and use of the 'string' module with newer constructs. (_path_join): New, used now instead of a bunch of copy-and-pasted string join() statements throughout. * viewvc-install Don't use the 'compat' module any more. Also, so some rearranging of non-critical bits. * misc/: New directory. * misc/py2html.py: Moved from 'lib/py2html.py'. * misc/PyFontify.py: Moved from 'lib/PyFontify.py'. * misc/elemx/: Moved from 'elemx/'. * misc/tparse/: Moved from 'tparse/'. * tools/make-release Omit 'misc' directory from releases, too. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2437 8cb11bc2-c004-0410-86c3-e597b4017df7
2010-09-03 20:49:52 +04:00
misc \
notes \
tests \
tools \
tparse \
viewcvs.sourceforge.net \
viewvc.org \
www; do
if [ -d ${TARGET}/${JUNK} ]; then
echo " Removing ${TARGET}/${JUNK}..."
rm -r ${TARGET}/${JUNK}
fi
done
# Make sure permissions are reasonable:
echo " Normalizing permissions..."
find ${TARGET} -print | xargs chmod uoa+r
find ${TARGET} -type d -print | xargs chmod uoa+x
if test ${PLATFORM} = windows; then
# Create also a ZIP file for those poor souls :-) still using Windows:
echo " Creating ZIP archive..."
zip -qor9 ${TARGET}.zip ${TARGET}
else
# Cut the tarball:
echo " Creating tarball archive..."
tar cf - ${TARGET} | gzip -9 > ${TARGET}.tar.gz
fi
# remove target directory
rm -r ${TARGET}
done
echo "Done."