Skip to content

Commit

Permalink
Add archive script for release
Browse files Browse the repository at this point in the history
  • Loading branch information
maralla committed May 19, 2016
1 parent 91d4c0e commit a846f48
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

JEMALLOC=deps/jemalloc
DIR=$(mktemp -d /tmp/corvus.XXXXXX)
TARGET=`pwd`

version=$(git describe --exact-match --tags 2> /dev/null)
if [ -z "$version" ]
then
version=$(git rev-parse --short HEAD)
else
version=${version:1}
fi

git ls-files | grep -v "$JEMALLOC\|archive.sh" > $DIR/files
(cd $JEMALLOC; git ls-files | sed "s#^#$JEMALLOC/#") >> $DIR/files
echo $JEMALLOC/configure >> $DIR/files
echo $JEMALLOC/VERSION >> $DIR/files

# tar --transform "s#^#corvus-$version/#" -cjf corvus-$version.tar.bz2 `cat $FILES`

mkdir $DIR/corvus-$version
rsync -R $(cat $DIR/files) $DIR/corvus-$version
tar -C $DIR -cjf corvus-$version.tar.bz2 corvus-$version
rm -rf $DIR

0 comments on commit a846f48

Please sign in to comment.