File: make-release

package info (click to toggle)
yaws 1.98-4%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 7,916 kB
  • ctags: 7,253
  • sloc: erlang: 37,484; sh: 4,328; ansic: 1,184; makefile: 1,027; lisp: 79; xml: 12; python: 3; php: 1
file content (57 lines) | stat: -rwxr-xr-x 1,247 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
#!/bin/sh

#set -x

# determine absolute path to source dir root
srctree="$(cd $(dirname "$0") && cd .. && pwd)"

# change to scripts dir (or wherever this script resides)
cd "$(dirname "$0")"
if [ ! -f ./make-release ]; then
    echo "need to be in scripts dir"; exit 1;
fi

. ../vsn.mk

echo packing release ${YAWS_VSN} 

TAG="yaws-${YAWS_VSN}"
NAME_VERSION="yaws-${YAWS_VSN}"


(cd ../win32; make clean all)
cd ../..


export GIT_DIR="$srctree/.git"
if test -d "$GIT_DIR" && test -f "$GIT_DIR/config"; then :;
else
	echo "Fatal: Could not find GIT_DIR at $GIT_DIR."
	exit 13
fi


# Add/update release tag
git tag -f -a -m "version ${YAWS_VSN}" "$TAG"

# Create release .tar.gz of sources
# (including symlink yaws -> $NAME_VERSION)
rm -rf tmp 2> /dev/null
mkdir tmp
git archive --format=tar --prefix="$NAME_VERSION/" "$TAG" | (cd tmp && tar xf -)
ln -s $NAME_VERSION tmp/yaws
(cd tmp/yaws; autoconf)
(cd tmp && tar cfz - yaws "$NAME_VERSION") > "$NAME_VERSION.tar.gz"

echo release resides in `pwd`/$NAME_VERSION.tar.gz
echo release resides in `pwd`/yaws/win32/Yaws-${YAWS_VSN}-windows-installer.exe

echo "To push this do:"
#echo "git push origin revs/tags/yaws-${version}:revs/tags/yaws-${version}"
echo "ehhh or git push --tags"


exit 0