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

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

[ckbs/trunk] More changes to helper scripts.

svn_status.sh: do not include commit.sh in status, (keep it in template form).
new_stable.sh: create first release at same time as stable version.

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