Mercurial > hg > openjdk > jigsaw > bdb
view dist/bumprel @ 0:a1985f14b030
Initial load
author | chegar |
---|---|
date | Fri, 11 May 2012 10:42:02 +0100 |
parents | |
children |
line wrap: on
line source
#!/bin/sh # Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved. # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # # $Id: $ # # Bump the Berkeley DB version P=`pwd` R=`dirname $P` progname="$0" VERSION="$1" assembly="../lang/csharp/src/Properties/AssemblyInfo.cs" t=/tmp/__assembly # Sanity check if [ ! -f $R/dist/RELEASE ] ; then echo "$progname must be run in the dist directory of a Berkeley DB tree" exit 1 fi OIFS="$IFS" IFS=. set -- $VERSION if [ $# != 5 ] ; then echo "Usage: $progname X.X.X.X.X -- sets the Berkeley DB version to X.X.X.X.X" exit 1 fi FAMILY="$1" RELEASE="$2" MAJOR="$3" MINOR="$4" PATCH="$5" DATE=`date "+%B %e, %Y"` IFS="$OFS" # Update the change log patch number -- there's 1 location to update in # the change log "table of contents", and 2 in the Change Log itself. #cd $R/docs_src/ref/changelog && vi toc.so ${MAJOR}.${MINOR}.html # Update the release number. cd $R/dist &&\ (echo "/^DB_VERSION_FAMILY/s/=.*/=$FAMILY/" &&\ echo "/^DB_VERSION_RELEASE/s/=.*/=$RELEASE/" &&\ echo "/^DB_VERSION_MAJOR/s/=.*/=$MAJOR/" &&\ echo "/^DB_VERSION_MINOR/s/=.*/=$MINOR/" &&\ echo "/^DB_VERSION_PATCH/s/=.*/=$PATCH/" &&\ echo "/^DB_RELEASE_DATE/s/=.*/=\"$DATE\"/" &&\ echo w &&\ echo q) | ed RELEASE > /dev/null VERSION=`sh -c '. ./RELEASE; echo $DB_VERSION'` echo "Berkeley DB release $VERSION." # Build auto-generated files. cd $R/dist && sh s_all # Update the CSharp assembly information sed -e "s:AssemblyVersion(\"[0-9]*\.[0-9]*\.[0-9]*\"):AssemblyVersion(\"$MAJOR\.$MINOR\.$PATCH\"):" < $assembly > $t cmp $t $assembly > /dev/null 2>&1 || (rm -f $assembly && cp $t $assembly && rm -f $t && chmod 444 $assembly) # Commit all of the changes. echo "Now run 'hg commit && hg tag db-$MAJOR.$MINOR.$PATCH && hg push'"