forked from outbrain/zookeepercli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·29 lines (22 loc) · 711 Bytes
/
build.sh
File metadata and controls
executable file
·29 lines (22 loc) · 711 Bytes
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
#!/bin/bash
# Simple packaging of zookeepercli
#
# Requires fpm: https://github.com/jordansissel/fpm
#
release_version="1.0.5"
release_dir=/tmp/zookeepercli
rm -rf $release_dir/*
mkdir -p $release_dir
cd $(dirname $0)
for f in $(find . -name "*.go"); do go fmt $f; done
GOPATH=/usr/share/golang:$(pwd)
go build -o $release_dir/zookeepercli ./src/github.com/outbrain/zookeepercli/main.go
if [[ $? -ne 0 ]] ; then
exit 1
fi
cd $release_dir
# rpm packaging
fpm -v "${release_version}" -f -s dir -t rpm -n zookeepercli -C $release_dir --prefix=/usr/bin .
fpm -v "${release_version}" -f -s dir -t deb -n zookeepercli -C $release_dir --prefix=/usr/bin .
echo "---"
echo "Done. Find releases in $release_dir"