LogoKolab Groupware OBS > Projects
Log In

View File buildtarball.sh of Package guam-selfcontained (Project Kolab:Winterfell)

#!/bin/bash

set -e

VERSION=0.9.12
NAME=guam-$VERSION

ROOT_DIR=$(pwd)

rm -Rf /tmp/$NAME
mkdir /tmp/$NAME
cd /tmp/$NAME

rm -f $NAME.tar.gz
[ -d "$NAME" ] && rm -rf "$NAME"
git clone --branch master ssh://git@git.kolab.org/diffusion/G/guam.git $NAME

pushd $NAME
./rebar3 deps

# Copy all dependencies to _checkouts, so they are available when building the rpm without internet access
mkdir -p _checkouts
cp -R _build/default/lib/* _checkouts/
cp -R _build/default/plugins/* _checkouts/

mkdir -p cache
cp -r ~/.cache/rebar3 cache/rebar3
tar --transform "s,^\.,guam-${VERSION}," --exclude="_build/test" --exclude=".git" --exclude="_build" -czf "$ROOT_DIR/$NAME.tar.gz" .
popd

cd $ROOT_DIR