/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: James Westby
  • Date: 2008-02-25 23:41:06 UTC
  • mto: This revision was merged to the branch mainline in revision 3246.
  • Revision ID: jw+debian@jameswestby.net-20080225234106-9b4ql42w13ijewp3
Make version-info --custom imply --all.

When using a custom template you can use variables like {clean} which
are not enabled by default. This causes an ugly traceback.

This fixes the issue by implying --all when --custom (or more exactly
--template) is used, so that all variables are available in templates.

This was the easier fix than having the template code report that the
user should pass --check-clean to have {clean} available, but will
have a performance impact on all users of version-info --custom,
regardless of whether they use {clean}.

Show diffs side-by-side

added added

removed removed

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