1#!/bin/bash
2
3git clean -xfdi
4git submodule foreach --recursive git clean -xfdi
5
6VERSION=`git describe --tags`
7DIR_NAME="modsecurity-$VERSION"
8TAR_NAME="modsecurity-$VERSION.tar.gz"
9
10MY_DIR=${PWD##*/}
11./build.sh
12
13cd ..
14tar --transform "s/^$MY_DIR/$DIR_NAME/" -cvzf $TAR_NAME --exclude .git $MY_DIR
15
16sha256sum $TAR_NAME > $TAR_NAME.sha256
17gpg --detach-sign -a $TAR_NAME
18
19cd -
20echo $TAR_NAME ": done."
21
22