-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·48 lines (34 loc) · 1.1 KB
/
build.sh
File metadata and controls
executable file
·48 lines (34 loc) · 1.1 KB
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
#!/bin/bash
if [ -z $1 ]; then
echo "the parameter is missing (git version tag)";
exit;
fi
# To create the build, requirements are: fpm, git, npm, bower, rpmbuild
rm -Rf /tmp/gadael_build
mkdir /tmp/gadael_build
cd /tmp/gadael_build || exit
# We need a gadael installation without dev dependencies
git clone https://github.com/gadael/gadael
cd gadael || exit
git checkout tags/$1 || exit
npm install --production --loglevel warn
bower install
rm -Rf doc/ test/
mv config.dist.js config.js
# Build debian package
fpm -s dir -t deb -p ../ -n gadael \
--config-files /etc/gadael/config.json \
-v $1 \
-d "mongodb > 2.4.14" \
-d "nodejs-legacy > 4.2.0" \
./=/var/lib/gadael dist/config.json=/etc/gadael/ dist/gadael.service=/etc/systemd/system/
# Build rpm package
fpm -s dir -t rpm -p ../ -n gadael \
--config-files /etc/gadael/config.json \
-v $1 \
-d "mongodb-org > 2.4.14" \
-d "nodejs > 4.2.0" \
./=/var/lib/gadael dist/config.json=/etc/gadael/ dist/gadael.service=/etc/systemd/system/
cd ..
rm -Rf gadael/
echo "Packages are in the /tmp/gadael_build folder"