-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·49 lines (37 loc) · 761 Bytes
/
Copy pathrelease.sh
File metadata and controls
executable file
·49 lines (37 loc) · 761 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh
set -e
help() {
cat << _EOF
Usage: release [-v version] [-h] [suffix]
-v version Define version string. If not used,
version is desumed from git tags
-h Show this help
suffix Append suffix to version string
_EOF
}
VERSION=`git describe --abbrev=0 --always --tags`
case "$1" in
-v)
shift
VERSION="$1"
shift
;;
-h)
help
exit 1
;;
esac
MOD="$1"
NAME=displace-$VERSION$MOD
TEMP=../temp-src
SRCPATH=$TEMP/$NAME
rm -rf $SRCPATH
mkdir -p $SRCPATH
rsync -rav --progress \
--exclude .git --exclude .qt.conf --exclude \*~ --exclude \*.tar.gz \
--exclude build --exclude 3rd-party --exclude cmake-\* \
. $SRCPATH
( cd $TEMP && tar zcvf $NAME.tar.gz $NAME )
mv $TEMP/$NAME.tar.gz .
rm -rf $TEMP
ls -l $NAME.tar.gz