blob: 84eec7c897f9f50e56c14259a6f925094efd2a0c (
plain)
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
58
59
60
61
62
|
#!/bin/bash
proj="baselayout-vserver"
svnroot="http://dev.croup.de/repos/gentoo-vps/${proj}"
ver=${1:-1.13.0}
usage() {
echo "Usage: mkrelease"
}
die() {
echo $1
exit ${2:-1}
}
if [[ $1 != "-f" ]] ; then
echo "Performing sanity checks (run with -f to skip) ..."
# Check that we're updated
svnfiles="$( svn status 2>&1 | egrep -v '^(U|P)' )"
if [[ -n ${svnfiles} ]] ; then
echo "Refusing to package tarball until svn is in sync:"
echo "$svnfiles"
exit 1
fi
fi
echo "Creating release tag... "
svn copy ${svnroot}/trunk ${svnroot}/tags/release-${ver} \
-m "Tagging the ${ver} release of the ${proj} project" &>/dev/null || die "svn copy failed"
echo "Make dist tarball..."
dest=dist/${proj}-${ver}
mkdir -p ${dest} &>/dev/null
for x in bin etc init.d sbin src rc-lists man; do
svn export $x ${dest}/${x}
done
mkdir -p ${dest}/lib/rcscripts
svn export --force net-scripts/init.d ${dest}/init.d
svn export net-scripts/net.modules.d ${dest}/lib/rcscripts/net.modules.d
svn export --force net-scripts/conf.d ${dest}/etc/conf.d
svn export ChangeLog ${dest}/ChangeLog
svn export ChangeLog.vserver ${dest}/ChangeLog.vserver
pushd dist/ &>/dev/null || die "pushd failed"
tar cjf ${proj}-${ver}.tar.bz2 ${proj}-${ver} || die "tar failed"
for i in *.tar*; do
md5sum $i > $i.md5
done
echo "Tarball ist at `pwd`"
popd &>/dev/null || die "popd failed"
|