forked from juju/juju
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-juju
executable file
·30 lines (27 loc) · 934 Bytes
/
build-juju
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
#!/bin/bash
set -eu
usage() {
cat <<EOT
usage: $0 BRANCH [REPO_PATH]"
Build the specified juju branch to a package. Intended for manual testing.
BRANCH is the branch to build.
REPO_PATH is end of the github repo URL. It defaults to juju/juju.
Packages are built for the current machine's series and the amd64 architecture.
DEBEMAIL and DEBFULLNAME are derived from "bzr whoami".
EOT
exit 1
}
test $# -gt 0 || usage
set -x
TOOLS_DIR=$(dirname $(readlink -f $0))
PATH=$TOOLS_DIR:$PATH
BRANCH=$1
REPO=https://github.com/${2-juju/juju}
DEBEMAIL=$(bzr whoami --email -d $TOOLS_DIR)
DEBFULLNAME=$(bzr whoami -d $TOOLS_DIR|sed 's/ *<.*>//')
SERIES=$(lsb_release --codename -s)
export PATH DEBEMAIL DEBFULLNAME
make-release-tarball.bash $BRANCH $REPO
build_package.py -v source ./juju-core_*.tar.gz ./ $SERIES 999999999
build_package.py -v binary juju-build-$SERIES-all/juju-core_*.dsc \
./build-binary-$SERIES-amd64 $SERIES amd64