-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild_package.sh
More file actions
executable file
·36 lines (32 loc) · 1.03 KB
/
build_package.sh
File metadata and controls
executable file
·36 lines (32 loc) · 1.03 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
#!/bin/sh -e
# Build deb package for zookeepercli
# Sergei Kraev <skraev@tradingview.com>
#
echo "========= Preparing packing start =========";
PKGNAME="zookeepercli"
VER=$(git describe --long --tags --always --abbrev=10 | sed 's/^[^0-9]//ig')
ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/)
RDIR="$(pwd)/pkgs_out/"
rm -rf "${RDIR}"
mkdir -p "$RDIR"
OUTTYPES="rpm deb apk tar zip"
for OUTTYPE in $OUTTYPES; do
echo "========= Packing ${OUTTYPE} start =========";
fpm \
--output-type "${OUTTYPE}" \
--input-type dir \
--force \
\
--name "${PKGNAME}" \
--package "${RDIR}" \
--version "${VER}" \
--architecture "${ARCH}" \
--maintainer 'Shlomi Noach <shlomi-noach@github.com>' \
--url 'https://github.com/openark/zookeepercli' \
--description 'Zookeeper client console' \
--license 'Apache 2.0' \
--category 'universe/net' \
--no-depends --no-auto-depends \
--prefix /usr/local/bin \
--chdir "./bin" .
done