diff --git a/.gitignore b/.gitignore index cd4ba5b..be3570f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ bin/rocksdb* # Generated files log/ data/ +dist/ # IntelliJ .idea/ diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..b87ef6a --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +version=`git rev-parse HEAD` +name=rocksdb-server-`echo $version | cut -c1-8` + +echo "Building: ${name}" +mvn install || exit 1 + +dir=dist/${name} +mkdir -p ${dir} || exit 2 +cp -r lib ${dir} || exit 3 +cp -r bin ${dir} || exit 3 +cp -r conf ${dir} || exit 3 + +(cd dist; tar -cvzf ${name}.tar.gz ${name}) \ No newline at end of file