~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to tools/packaging/update-control.sh

  • Committer: Patch Queue Manager
  • Date: 2011-11-17 12:59:55 UTC
  • mfrom: (6263.2.3 hpss-make-workingtrees)
  • Revision ID: pqm@pqm.ubuntu.com-20111117125955-yjbz106l8gkzslos
(jelmer) Add HPSS call ``Repository.make_working_trees``. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# Helper to run sed on versions in dependencies in debian/control
 
3
 
 
4
if [ -z "$UBUNTU_RELEASES" ]; then
 
5
    echo "Configure the distro platforms that you want to"
 
6
    echo "build with a line like:"
 
7
    echo '  export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid jaunty"'
 
8
    exit 1
 
9
fi
 
10
 
 
11
OLD_VERSION=$1
 
12
NEW_VERSION=$2
 
13
NEXT_VERSION=$3
 
14
if [ -z "$OLD_VERSION" -o -z "$NEW_VERSION" -o -z "$NEXT_VERSION" ]; then
 
15
    echo "Missing version"
 
16
    echo "You want something like:"
 
17
    echo "  update-control.sh 1.5 1.6 1.7"
 
18
    exit
 
19
fi
 
20
 
 
21
if [ "$PACKAGE" = "bzr" ]; then
 
22
    continue
 
23
fi
 
24
for DISTRO in $UBUNTU_RELEASES; do
 
25
    PPAVERSION="$VERSION~${DISTRO}1"
 
26
    (
 
27
        echo "Updating control for $DISTRO"
 
28
        cd "$PACKAGE-$DISTRO" &&
 
29
            sed -i -e "s/$NEW_VERSION~/$NEXT_VERSION~/;s/$OLD_VERSION~/$NEW_VERSION~/" control &&
 
30
            bzr commit -m "New upstream release: $PPAVERSION, update control"
 
31
    )
 
32
done