-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_fpm.sh
executable file
·65 lines (49 loc) · 1.19 KB
/
run_fpm.sh
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
#!/bin/bash
set -e
# Package deb files using fpm.
PROJECTS="
ceilometer_plugins
dashboard_plugins
nova_extensions
router_appliance
userapi_extensions
"
LOGFILE=fpm.log
msg() {
echo
echo "================================================================================"
echo "$*"
echo "================================================================================"
}
pkgone() {
typeset proj="$1"
msg $proj
rm -f *.deb
msg "Running sdist"
python setup.py sdist
# Generate the deb package
msg "Running fpm"
fpm -s python \
-t deb \
--vendor "$(python setup.py --author)" \
--maintainer "$(python setup.py --author-email)" \
--exclude '*dist-packages/tests/*' \
--description "$(python setup.py --description)" \
.
mv *.deb ../packages
}
show_packages() {
# Show the details for the package we just created
msg "Package details"
for pkg in packages/*.deb
do
msg $pkg
dpkg -I "$pkg"
done
}
mkdir -p packages
for proj in $PROJECTS
do
(cd $proj && pkgone $proj && cd ..) 2>&1 | tee ${LOGFILE}.${proj}
done
show_packages 2>&1 | tee $LOGFILE