-
Notifications
You must be signed in to change notification settings - Fork 19
/
make-release
executable file
·48 lines (33 loc) · 1.3 KB
/
make-release
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/sh
ROOT="`pwd`/build"
mkdir -p $ROOT
after_install_script="$ROOT/after_install.sh"
RPMROOT="$ROOT/rpmbuild"
DEBROOT="$ROOT/debbuild"
cat > $after_install_script << EOF
systemctl daemon-reload
EOF
VERSION=$(date +%y.%m.%d)
BIN="$RPMROOT/usr/bin"
CONF="$RPMROOT/etc/eru"
SERVICE="$RPMROOT/usr/lib/systemd/system"
mkdir -p $BIN
mkdir -p $CONF
mkdir -p $SERVICE
cp eru-agent $BIN
cp agent.yaml.sample $CONF
cp eru-agent.service $SERVICE
echo $VERSION rpm build begin
fpm -f -s dir -t rpm -n eru-agent --epoch 0 -v $VERSION --iteration 1.el7 -C $RPMROOT -p $PWD --after-install $after_install_script --verbose --category 'Development/App' --description 'docker eru agent' --url 'https://github.com/projecteru2/agent' --license 'MIT' -a all --no-rpm-sign usr etc
BIN="$DEBROOT/usr/bin"
CONF="$DEBROOT/etc/eru"
SERVICE="$DEBROOT/lib/systemd/system"
mkdir -p $BIN
mkdir -p $CONF
mkdir -p $SERVICE
cp eru-agent $BIN
cp agent.yaml.sample $CONF
cp eru-agent.service $SERVICE
echo $VERSION deb build begin
fpm -f -s dir -t deb -n eru-agent -v $VERSION --iteration 1.noarch -C $DEBROOT -p $PWD --verbose --category 'Development/App' --description 'docker eru agent' --url 'https://github.com/projecteru2/agent' --license 'MIT' --after-install $after_install_script -deb-no-default-config-files usr etc lib
rm -rf $ROOT