5 # Bump the Berkeley DB version
11 assembly="../csharp/Properties/AssemblyInfo.cs"
15 if [ ! -f $R/dist/RELEASE ] ; then
16 echo "$progname must be run in the dist directory of a Berkeley DB tree"
25 echo "Usage: $progname X.X.X -- sets the Berkeley DB version to X.X.X"
28 MAJOR="$1" MINOR="$2" PATCH="$3"
32 # Update the change log patch number -- there's 1 location to update in
33 # the change log "table of contents", and 2 in the Change Log itself.
34 #cd $R/docs_src/ref/changelog && vi toc.so ${MAJOR}.${MINOR}.html
36 # Update the release number.
38 (echo "/^DB_VERSION_MAJOR/s/=.*/=$MAJOR/" &&\
39 echo "/^DB_VERSION_MINOR/s/=.*/=$MINOR/" &&\
40 echo "/^DB_VERSION_PATCH/s/=.*/=$PATCH/" &&\
42 echo q) | ed RELEASE > /dev/null
43 VERSION=`sh -c '. RELEASE; echo $DB_VERSION'`
44 echo "Berkeley DB release $VERSION."
46 # Build auto-generated files.
47 cd $R/dist && sh s_all
49 # Update the CSharp assembly information
50 sed -e "s:AssemblyVersion(\"[0-9]*\.[0-9]*\.[0-9]*\"):AssemblyVersion(\"$MAJOR\.$MINOR\.$PATCH\"):" < $assembly > $t
51 cmp $t $assembly > /dev/null 2>&1 ||
52 (rm -f $assembly && cp $t $assembly && rm -f $t && chmod 444 $assembly)
54 # Commit all of the changes.
55 echo "Now run 'hg commit && hg tag db-$MAJOR.$MINOR.$PATCH && hg push'"