source: projects/ckbs/trunk/new_stable.sh @ 87

Last change on this file since 87 was 87, checked in by bradbell, 11 years ago

[ckbs/trunk] Change which wast done by hand at revisions 85 and 86.

new_stable.sh: Copy documentaiton into stable before creating first release.

  • Property svn:executable set to *
File size: 2.6 KB
Line 
1#! /bin/bash
2# -------------------------------------------------------------------
3# ckbs: Constrained Kalman-Bucy Smoother Program: Copyright (C) 2006
4# Authors: Bradlely Bell:        bradbell at washington dot edu
5#          Gianluigi Pillonetto: giapi at dei dot unipd dot it
6# License: GNU General Public License Version 2
7# ----------------------------------------------------------------------------
8# check initial working directory
9dir=`pwd | sed -e 's|.*/||'`
10if [ "$dir" != "trunk" ]
11then
12        echo "new_stable.sh: must execute this script in the trunk"
13        exit 1
14fi
15#
16echo "Getting current revision number for version of trunk"
17rev_trunk=`svn info --revision HEAD | \
18        grep '^Revision:' | sed -e 's|^Revision: *||'`
19echo "rev_trunk=$rev_trunk"
20#
21# number for the stable version we are creating
22stable_version=`date +%F |sed -e 's/-//g' -e 's|^|0.|'`
23#
24# check that the documentation is up to date
25doc_version=`grep '$section' ckbs.omh | \
26        sed -e 's|.*ckbs-\([0-9.]\{10\}\).*|\1|'`
27if [ "$doc_version" != "$stable_version" ]
28then
29        echo "new_stable.sh: run ./copy_doc.sh to bring doc version up to date"
30        echo "new_stable.sh: stable_version = $stable_version"
31        echo "new_stable.sh: doc_version    = $doc_version"
32        exit 1
33fi
34#
35# web address for trunk, stable, and release
36repository="https://projects.coin-or.org/svn/CoinBazaar"
37rep_trunk="$repository/projects/ckbs/trunk"
38rep_stable="$repository/projects/ckbs/stable/$stable_version"
39rep_release="$repository/projects/ckbs/releases/$stable_version.0"
40rep_html="$repository/html/ckbs"
41#
42# create the new stable version
43msg="[ckbs/stable] Create ckbs/stable/$stable_version
44from ckbs/trunk at revision $rev_trunk."
45echo "svn copy $rep_trunk $rep_stable -m \"$msg\""
46if ! svn copy  $rep_trunk $rep_stable -m "$msg"
47then
48        "new_stable.sh: Cannot create $rep_stable"
49        exit 1
50fi
51#
52# add a copy of the documentation to the stable version
53msg="[ckbs/stable] Add documentation corresponding to this stable version"
54echo "svn copy $rep_html $rep_stable/doc -m \"$msg\""
55if ! svn copy $rep_html $rep_stable/doc -m "$msg"
56then
57        "new_stable.sh: Cannot copy documentation for this stable version"
58        exit 1
59fi
60#
61# create the new release version
62msg="[ckbs/releases] Create ckbs/releases/$stable_version.0
63from ckbs/trunk at revision $rev_trunk."
64echo "svn copy $rep_stable $rep_release -m \"$msg\""
65if ! svn copy  $rep_stable $rep_release -m "$msg"
66then
67        "new_stable.sh: Cannot create $rep_release"
68        exit 1
69fi
70echo ""
71echo "To check out this stable version use the command:"
72echo "  svn_checkout.sh ckbs stable/$stable_version"
73echo "To check out this release version use the command:"
74echo "  svn_checkout.sh ckbs releases/$stable_version.0"
Note: See TracBrowser for help on using the repository browser.