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

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

[ckbs/trunk] Move ckbs.omh so file names are releative to trunk directory.

ckbs.omh: move to trunk directory.
ckbs.omh: move from omh subdirectory, OMhelp path commands no longer needed.
copy_doc.sh: change omh/ckbs.omh to ckbs.omh.
new_stable.sh: change omh/ckbs.omh to ckbs.omh.
build_doc.sh: change omh/ckbs.omh to ckbs.omh.

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