forked from mozilla-services/socorro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.sh
executable file
·44 lines (38 loc) · 1.42 KB
/
package.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
#! /bin/bash -e
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Package Socorro for redistribution
source scripts/defaults
DESC="A distributed system for collecting, processing,
and displaying crash reports from clients using Breakpad"
if [ ! -d "$BUILD_DIR" ]; then
echo "Socorro has not been built ($BUILD_DIR does not exist)."
echo " Please run './scripts/install.sh' before continuing."
exit 1
fi
echo "> Building Socorro $BUILD_VERSION ..."
if [ "$BUILD_TYPE" != "tar" ]; then
fpm -s dir -t $BUILD_TYPE \
-v $BUILD_VERSION \
-n "socorro" \
-m "<socorro-dev@mozilla.com>" \
-C $BUILD_DIR \
--epoch 1 \
--license "MPL" \
--vendor "Mozilla" \
--url "https://wiki.mozilla.org/Socorro" \
--description "$DESC" \
--before-install scripts/package/before-install.sh \
--after-install scripts/package/after-install.sh \
--before-remove scripts/package/before-remove.sh \
--after-remove scripts/package/after-remove.sh \
--config-files /etc/socorro \
--exclude *.pyc \
--exclude *.swp \
data etc var
else
tar -C ${BUILD_DIR%%socorro} --mode 755 --exclude-vcs --owner 0 --group 0 -zcf socorro.tar.gz socorro/
fi
echo "> Build Complete."