source: projects/ckbs/trunk/new_stable.sh

Last change on this file was 509, checked in by bradbell, 9 years ago

make checkout instructions general (not specific to Brad's system).

  • Property svn:executable set to *
File size: 2.4 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# exit on any error
9set -e
10#
11# check initial working directory
12dir=`pwd | sed -e 's|.*/||'`
13if [ "$dir" != "trunk" ]
14then
15        echo "new_stable.sh: must execute this script in the trunk"
16        exit 1
17fi
18#
19echo "Getting current repository revision number"
20rev_trunk=`svn info --revision HEAD | \
21        grep '^Revision:' | sed -e 's|^Revision: *||'`
22echo "rev_trunk = $rev_trunk"
23#
24echo "Getting current stable version number"
25stable_version=`date +%F | sed -e 's/-//g' -e 's|^|0.|'`
26echo "stable_version = $stable_version"
27#
28echo "Getting current documentation verison number"
29doc_version=`grep '$section' ckbs.omh | \
30        sed -e 's|.*ckbs-\([0-9.]\{10\}\).*|\1|'`
31echo "doc_version = $doc_version"
32#
33if [ "$doc_version" != "$stable_version" ]
34then
35        echo "new_stable.sh: run ./copy_doc.sh to bring doc_version up to date"
36        echo "new_stable.sh: stable_version = $stable_version"
37        echo "new_stable.sh: doc_version    = $doc_version"
38        exit 1
39fi
40#
41# web address for trunk, stable, release, and documentation
42repository="https://projects.coin-or.org/svn/CoinBazaar"
43rep_trunk="$repository/projects/ckbs/trunk"
44rep_stable="$repository/projects/ckbs/stable/$stable_version"
45rep_release="$repository/projects/ckbs/releases/$stable_version.0"
46rep_html="$repository/html/ckbs"
47#
48# create the new stable version
49msg="copy ckbs/trunk at revision $rev_trunk to ckbs/stable/$stable_version"
50echo "svn copy $rep_trunk $rep_stable -m \"$msg\""
51svn copy  $rep_trunk $rep_stable -m "$msg"
52#
53# Add documentation to the stable version
54msg="[ckbs/stable] Add documentation corresponding to this stable version"
55echo "svn copy $rep_html $rep_stable/doc -m \"$msg\""
56svn copy $rep_html $rep_stable/doc -m "$msg"
57#
58# create the new release version
59msg="copy ckbs/stable/$stable_version to ckbs/releases/$stable_version.0"
60svn copy $rep_stable $rep_release -m "$msg"
61#
62echo ""
63echo "To check out this stable version use the command:"
64echo "  svn checkout \\"
65echo "$rep_stable"
66echo "To check out this release version use the command:"
67echo "  svn checkout \\"
68echo "$rep_release"
Note: See TracBrowser for help on using the repository browser.