[GIT] ppl/w3ppl(master): Converted to git.

Module: ppl/w3ppl Branch: master Commit: 56ad11fbea8ac9bd1446439319fe6771519427c5 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/w3ppl.git;a=commit;h=56ad11fbea8...
Author: Abramo Bagnara abramo.bagnara@gmail.com Date: Tue Apr 7 16:59:46 2009 +0200
Converted to git.
---
bin/ppl_release | 62 ++++++++++++++++++++++++------------------------------ 1 files changed, 28 insertions(+), 34 deletions(-)
diff --git a/bin/ppl_release b/bin/ppl_release index 9b4d71b..f0219ba 100755 --- a/bin/ppl_release +++ b/bin/ppl_release @@ -18,7 +18,6 @@ # Here is an example Usage of this script, to create a PPL 0.8 # release: # -# cvs -d cvs.cs.unipr.it:/cvs/ppl rtag -b ppl-0_8-branch ppl # ppl_release -f -r 0.8 sources # ppl_release -f -r 0.8 tarfiles # ppl_release -f -r 0.8 rpmfiles @@ -93,9 +92,11 @@ build_sources() { # and version strings are updated. if [ ${FINAL} -ne 0 ]; then inform "Updating ChangeLogs and version files" - ${CVS} co -d "`basename ${SOURCE_DIRECTORY}`" \ - -r ${BRANCH} ppl || \ - error "Could not check out release sources" + ${GIT} clone ${GITROOT} ${SOURCE_DIRECTORY} || \ + error "Could not clone release sources" + (changedir ${SOURCE_DIRECTORY} + ${GIT} checkout --track -b ${BRANCH} origin/${BRANCH}) || \ + error "Could not checkout ${BRANCH}" for x in `find ${SOURCE_DIRECTORY} -name ChangeLog`; do cat - ${x} > ${x}.new <<EOF ${LONG_DATE} Release Manager @@ -106,7 +107,7 @@ EOF mv ${x}.new ${x} || \ error "Could not update ${x}" (changedir `dirname ${x}` && \ - ${CVS} ci -m 'Mark ChangeLog.' `basename ${x}`) || \ + ${GIT} commit -m 'Mark ChangeLog.' `basename ${x}`) || \ error "Could not commit ${x}" done
@@ -116,31 +117,25 @@ EOF (changedir `dirname ${SOURCE_DIRECTORY}/${x}` && \ sed -e 's/^AC_INIT(([^,]*),[ ]*[^,]*,[ ]*([^)]*),[ ]*([^)]*))/AC_INIT(\1, '[${RELEASE}]', \2, \3)/g' < ${y} > ${y}.new && \ mv ${y}.new ${y} && \ - ${CVS} ci -m 'Update version.' ${y}) || \ + ${GIT} commit -m 'Update version.' ${y}) || \ error "Could not update ${x}" done
# Make sure we tag the sources for a final release. TAG="ppl_`echo ${RELEASE} | tr . _`_release"
- rm -rf ${SOURCE_DIRECTORY} +# rm -rf ${SOURCE_DIRECTORY} fi
# Tag the sources. if [ -n "${TAG}" ]; then inform "Tagging release sources" - ${CVS} rtag -r ${BRANCH} -F ${TAG} ppl || \ - error "Could not tag release sources" + (changedir ${SOURCE_DIRECTORY} + ${GIT} tag -s -m "Release ${RELEASE} tagged ${TAG}." -f ${TAG} HEAD) || \ + error "Could not tag release sources" BRANCH=$TAG fi
- # Export the current sources. - inform "Retrieving release sources" - ${CVS} \ - export -d "`basename ${SOURCE_DIRECTORY}`" \ - -r ${BRANCH} ppl || \ - error "Could not retrieve release sources" - # Configure the sources inform "Configuring the release sources" changedir "${SOURCE_DIRECTORY}" @@ -187,7 +182,7 @@ build_rpmfiles() { changedir "${WORKING_DIRECTORY}" # RPM_DIR=`grep topdir /home/roberto/.rpmmacros | cut -d" " -f2 | sed -e "s/)//g"` RPM_DIR=$HOME/rpm - cp ${SOURCE_DIRECTORY}/ppl.spec ${RPM_DIR}/SPECS + cp ${SOURCE_DIRECTORY}/fedora/ppl.spec ${RPM_DIR}/SPECS cp ppl-*.tar.gz ${RPM_DIR}/SOURCES rpmbuild -ba --sign ${RPM_DIR}/SPECS/ppl.spec mv -f ${RPM_DIR}/SRPMS/ppl-${RELEASE}-1.src.rpm ${WORKING_DIRECTORY} @@ -216,7 +211,7 @@ EOF # Commit the change log
if [ ${FINAL} -ne 0 ]; then - ${CVS} ci -m 'Add release entry.' debian/changelog \ + ${GIT} commit -m 'Add release entry.' debian/changelog \ || error "Could not commit changelog." fi
@@ -298,15 +293,15 @@ DATE=`date "+%Y%m%d"` LONG_DATE=`date "+%Y-%m-%d"` RFC_2822_DATE=`date --rfc-2822`
-# The CVS server containing the PPL repository. -#CVS_SERVER="localhost" -CVS_SERVER="cvs.cs.unipr.it" +# The GIT server containing the PPL repository. +#GIT_SERVER="localhost" +GIT_SERVER="git.cs.unipr.it" # The path to the repository on that server. -CVS_REPOSITORY="/cvs/ppl" -# The CVS protocol to use. -CVS_PROTOCOL="ext" +GIT_REPOSITORY="/git/ppl/ppl.git" +# The GIT protocol to use. +GIT_PROTOCOL="ssh" # The username to use when connecting to the server. -CVS_USERNAME="${USER}" +GIT_USERNAME="${USER}"
# The machine to which files will be uploaded. PPL_HOSTNAME="ftp.cs.unipr.it" @@ -347,7 +342,7 @@ SOURCE_DIRECTORY="" # Non-zero if this is the final release, rather than a prerelease. FINAL=0
-# Non-zero if we are running locally on cvs.cs.unipr.it, and use local CVS +# Non-zero if we are running locally on git.cs.unipr.it, and use local GIT # and copy directly to the FTP directory. LOCAL=0
@@ -362,7 +357,7 @@ MODE_UPLOAD=0 # Programs we use.
BZIP2="${BZIP2:-bzip2}" -CVS="${CVS:-cvs -f -Q -z9}" +GIT="${GIT:-git}" DIFF="${DIFF:-diff -Nrc3pad}" ENV="${ENV:-env}" GZIP="${GZIP:-gzip --best}" @@ -380,7 +375,7 @@ while getopts "d:fr:u:t:p:sl" ARG; do d) DESTINATION="${OPTARG}";; r) RELEASE="${OPTARG}";; t) TAG="${OPTARG}";; - u) CVS_USERNAME="${OPTARG}";; + u) GIT_USERNAME="${OPTARG}";; f) FINAL=1;; l) LOCAL=1 SCP=cp @@ -396,7 +391,7 @@ done shift `expr ${OPTIND} - 1`
# Perform consistency checking. -if [ ${LOCAL} -eq 0 ] && [ -z ${CVS_USERNAME} ]; then +if [ ${LOCAL} -eq 0 ] && [ -z ${GIT_USERNAME} ]; then error "No username specified" fi
@@ -440,14 +435,13 @@ fi WORKING_DIRECTORY="${DESTINATION}/ppl-${RELEASE}" SOURCE_DIRECTORY="${WORKING_DIRECTORY}/ppl-${RELEASE}"
-# Set up CVSROOT. +# Set up GITROOT. if [ $LOCAL -eq 0 ]; then - CVSROOT=":${CVS_PROTOCOL}:${CVS_USERNAME}@" - CVSROOT="${CVSROOT}${CVS_SERVER}:${CVS_REPOSITORY}" + GITROOT="${GIT_PROTOCOL}://${GIT_USERNAME}@" + GITROOT="${GITROOT}${GIT_SERVER}${GIT_REPOSITORY}" else - CVSROOT="${CVS_REPOSITORY}" + GITROOT="${GIT_REPOSITORY}" fi -export CVSROOT
######################################################################## # Main Program
participants (1)
-
Abramo Bagnara