[PPL-devel] [GIT] ppl/w3ppl(master): Removed snapshots.

Abramo Bagnara abramo.bagnara at gmail.com
Tue Apr 7 17:00:20 CEST 2009


Module: ppl/w3ppl
Branch: master
Commit: 5c205f8cf1b42d3a83a86363704e91b0a397df76
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/w3ppl.git;a=commit;h=5c205f8cf1b42d3a83a86363704e91b0a397df76

Author: Abramo Bagnara <abramo.bagnara at gmail.com>
Date:   Tue Apr  7 14:08:40 2009 +0200

Removed snapshots.

---

 bin/ppl_release |  102 +++++++++++++------------------------------------------
 1 files changed, 24 insertions(+), 78 deletions(-)

diff --git a/bin/ppl_release b/bin/ppl_release
index 8cdce55..9b4d71b 100755
--- a/bin/ppl_release
+++ b/bin/ppl_release
@@ -347,10 +347,6 @@ SOURCE_DIRECTORY=""
 # Non-zero if this is the final release, rather than a prerelease.
 FINAL=0
 
-# Non-zero if we are building a snapshot, and don't build ppl or
-# include generated files.
-SNAPSHOT=0
-
 # Non-zero if we are running locally on cvs.cs.unipr.it, and use local CVS
 # and copy directly to the FTP directory.
 LOCAL=0
@@ -386,7 +382,6 @@ while getopts "d:fr:u:t:p:sl" ARG; do
     t)    TAG="${OPTARG}";;
     u)    CVS_USERNAME="${OPTARG}";;
     f)    FINAL=1;;
-    s)    SNAPSHOT=1;;
     l)    LOCAL=1
 	  SCP=cp
 	  FTP_PATH="/var/ftp/pub/ppl"
@@ -409,53 +404,36 @@ if [ ! -d ${DESTINATION} ]; then
   error "\`${DESTINATION}' is not a directory"
 fi
 
-if [ $SNAPSHOT -eq 0 ]; then
-  if [ -z ${RELEASE} ]; then
-    error "No release number specified"
-  fi
+if [ -z ${RELEASE} ]; then
+  error "No release number specified"
+fi
 
-  # Compute the major and minor release numbers.
-  RELEASE_MAJOR=`echo $RELEASE | awk -v FS=. '{ print $1; }'`
-  RELEASE_MINOR=`echo $RELEASE | awk -v FS=. '{ print $2; }'`
-  RELEASE_REVISION=`echo $RELEASE | awk -v FS=. '{ print $3; }'`
+# Compute the major and minor release numbers.
+RELEASE_MAJOR=`echo $RELEASE | awk -v FS=. '{ print $1; }'`
+RELEASE_MINOR=`echo $RELEASE | awk -v FS=. '{ print $2; }'`
+RELEASE_REVISION=`echo $RELEASE | awk -v FS=. '{ print $3; }'`
 
-  if [ -z "${RELEASE_MAJOR}" ] || [ -z "${RELEASE_MINOR}" ]; then
-    error "Release number \`${RELEASE}' is invalid"
-  fi
+if [ -z "${RELEASE_MAJOR}" ] || [ -z "${RELEASE_MINOR}" ]; then
+  error "Release number \`${RELEASE}' is invalid"
+fi
 
-  # Compute the full name of the release.
-  if [ -z "${RELEASE_REVISION}" ]; then
-    RELEASE="${RELEASE_MAJOR}.${RELEASE_MINOR}"
-  else
-    RELEASE="${RELEASE_MAJOR}.${RELEASE_MINOR}.${RELEASE_REVISION}"
-  fi
+# Compute the full name of the release.
+if [ -z "${RELEASE_REVISION}" ]; then
+  RELEASE="${RELEASE_MAJOR}.${RELEASE_MINOR}"
+else
+  RELEASE="${RELEASE_MAJOR}.${RELEASE_MINOR}.${RELEASE_REVISION}"
+fi
 
-  # Compute the name of the branch, which is based solely on the major
-  # and minor release numbers.
-  BRANCH="ppl-${RELEASE_MAJOR}_${RELEASE_MINOR}-branch"
+# Compute the name of the branch, which is based solely on the major
+# and minor release numbers.
+BRANCH="ppl-${RELEASE_MAJOR}_${RELEASE_MINOR}-branch"
 
-  # If this is not a final release, set various parameters acordingly.
-  if [ ${FINAL} -ne 1 ]; then
-    RELEASE="${RELEASE}-${DATE}"
-    FTP_PATH="${FTP_PATH}/snapshots/"
-  else
-    FTP_PATH="${FTP_PATH}/releases/${RELEASE}/"
-  fi
+# If this is not a final release, set various parameters acordingly.
+if [ ${FINAL} -ne 1 ]; then
+  RELEASE="${RELEASE}-${DATE}"
+  FTP_PATH="${FTP_PATH}/snapshots/"
 else
-  RELEASE=$DATE
-  # For now snapshots come from the mainline.
-  BRANCH=HEAD
-  FTP_PATH="${FTP_PATH}/snapshots/${LONG_DATE}"
-  TAG=ppl_ss_${DATE}
-
-  # Building locally on cvs.cs.unipr.it, we know what the last snapshot date
-  # was.
-  if [ $LOCAL -ne 0 ]; then
-    LAST_DATE=`cat ~/.snapshot_date`
-    LAST_LONG_DATE=`date --date=$LAST_DATE +%Y-%m-%d`
-    LAST_DIR=/var/ftp/pub/ppl/snapshots/${LAST_LONG_DATE}
-    OLD_TARS=${LAST_DIR}/ppl-${LAST_DATE}.tar.gz
-  fi
+  FTP_PATH="${FTP_PATH}/releases/${RELEASE}/"
 fi
 
 # Compute the name of the WORKING_DIRECTORY and the SOURCE_DIRECTORY.
@@ -529,36 +507,4 @@ fi
 
 if [ $MODE_UPLOAD -ne 0 ]; then
   upload_files
-
-  # For snapshots, make some further updates.
-  if [ $SNAPSHOT -ne 0 ] && [ $LOCAL -ne 0 ]; then
-    # Update links on the FTP server.
-    TEXT_DATE=`date --date=$DATE +%B\ %d,\ %Y`
-    cd /var/ftp/pub/ppl/snapshots
-    sed -e "s%@DATE@%$DATE%g" -e "s%@LAST_DATE@%$LAST_DATE%g" \
-      -e "s%@LONG_DATE@%$LONG_DATE%g" \
-      -e "s%@TEXT_DATE@%$TEXT_DATE%g" < ~/scripts/snapshot-README > $$
-    mv $$ README
-    sed -e "s%@DATE@%$DATE%g" -e "s%@LAST_DATE@%$LAST_DATE%g" \
-      -e "s%@LONG_DATE@%$LONG_DATE%g" \
-      -e "s%@TEXT_DATE@%$TEXT_DATE%g" < ~/scripts/snapshot-index.html > $$
-    mv $$ index.html
-
-    touch LATEST-IS-$LONG_DATE
-    rm -f LATEST-IS-$LAST_LONG_DATE
-
-    # Update snapshot date file.
-    changedir ~
-    echo $DATE >.snapshot_date
-
-    # Update the ppl_latest_snapshot tag.
-    ${CVS} rtag -d ppl_latest_snapshot ppl
-    ${CVS} rtag -rppl_ss_${DATE} ppl_latest_snapshot ppl
-
-    # Announce the snapshot.
-    mail -s "ppl-ss-$DATE is now available" ppl-devel at cs.unipr.it < /var/ftp/pub/ppl/snapshots/README
-
-    # Remove working directory.
-    rm -rf ${WORKING_DIRECTORY}
-  fi
 fi




More information about the PPL-devel mailing list