~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#! /bin/sh

# Find the location of your Launchpad
if [ ! -f ~/.rocketfuel ]; then
  echo "You need a file called ~/.rocketfuel containing a single line"
  echo "like:"
  echo "   LAUNCHPAD=~/projects/ubuntu"
  echo "This line should give the location of the top level directory"
  echo "containing your launchpad and config checkouts."
  exit 1
fi
source ~/.rocketfuel

# check that your .rocketfuel file included a line giving the launchpad
# checkout location
if [ ! $LAUNCHPAD ]; then
  echo "Your ~/.rocketfuel file must include a line giving the location"
  echo "of your launchpad directory, of the form"
  echo "LAUNCHPAD=~/projects/ubuntu"
  echo
  echo "Of course, use the correct location for your setup. The"
  echo "directory you specify should at least contain your configs"
  echo "(in a directory called configs) and your launchpad checkout"
  echo "in a directory called launchpad."
  exit 1
fi

if [[ ! "$1" ]]; then
  echo "Usage: launch \"commit message\""
  exit 1
fi

# move into position
cd $LAUNCHPAD/launchpad

# check for loose files
baz status --lint --untagged-files --strict
if [ $? -gt 0 ]; then
  echo "You have untagged files. Please add and commit before launching."
  exit 1
fi

# then check if there are unmerged changes
baz diff --quiet
if [ $? -gt 0 ]; then
    echo "You've got changes! Please commit them before launching."
    exit 1
fi;


# run tests
make check
if [ $? -gt 0 ]; then
  echo "Page tests failed, cannot launch."
  exit 1
fi

# mirror archive
baz archive-mirror
if [ $? -gt 0 ]; then
  echo "Archive mirroring failed, cannot launch."
  exit 1
fi

$LAUNCHPAD/arch-pqm/bin/arch-submit-merge "$1" pqm@pqm.ubuntu.com