File: release

package info (click to toggle)
libpqxx 4.0.1%2Bdfsg3-8
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,012 kB
  • ctags: 9,469
  • sloc: sh: 11,289; cpp: 10,801; xml: 1,256; makefile: 287; ansic: 195; python: 159
file content (113 lines) | stat: -rwxr-xr-x 2,567 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#! /bin/bash
# Release current libpqxx trunk (or other branch).
#
# Use this after a successful full test run in the parent series.
#
# Arguments:
#   <next version number> [parent]
#
# The next version number is the one for a future release in the parent series,
# not the version that's being released now.  So if you're releasing x.y.0, that
# would be x.y+1.0.  If you're releasing some other x.y.z, it's x.y.z+1.
#
# The parent branch defaults to "trunk."  For x.y.z releases (where z > 0), use
# branches/x.y.
set -e

NEXTVERSION="$1"
if test -z "$NEXTVERSION"
then
	echo "Usage: $0 <next-version> [parent]" >&2
	exit 1
fi

PARENT="$2"
if test -z "$PARENT"
then
	PARENT="trunk"
fi

REPO="svn+ssh://pqxx.org/srv/svn/libpqxx/"
FTP="/srv/ftp/libpqxx"
SNAPSHOT="/home/jtv/public_html/tmp/pqxx/snapshot"
DOC="/srv/www/devprojects/libpqxx/doc"

CHECKOUT="`mktemp -p /tmp -d pqxx.XXXXXXXXXX`"
echo "** Checking out source tree to $CHECKOUT **"
cd -- "$CHECKOUT"
svn co -q "$REPO"
cd libpqxx/

export PATH="$PATH:$CHECKOUT/libpqxx/$PARENT/tools"

pushd "$PARENT" >/dev/null
PQXXVERSION="`extract_version`"
popd >/dev/null

if test "$PQXXVERSION" = "$NEXTVERSION"
then
	cat <<EOF >&2
The given "next version" is the same as the existing version in
$PARENT/PQXXVERSION.  Instead, give the next version for a future
release in the same series.
EOF
	exit 2
fi

RELEASEDATE="`date +'%a, %d %b %y %T %z'`"


echo "** Updating source tree **"
svn cp "$PARENT" "tags/$PQXXVERSION"


# Mark new trunk in debian/changelog.
cat - <<EOF "tags/$PQXXVERSION"/debian/changelog >"$PARENT"/debian/changelog
libpqxx ($NEXTVERSION-1) unstable; urgency=medium

  * Forked release $PQXXVERSION.

 -- Jeroen T. Vermeulen <jtv@xs4all.nl>  $RELEASEDATE

EOF

# Mark next version in NEWS.
cat - <<EOF "tags/$PQXXVERSION/NEWS" >"$PARENT/NEWS"
$NEXTVERSION
EOF

echo "PQXX_VERSION	$NEXTVERSION" >"$PARENT"/VERSION

cd /tmp

echo "** Setting up new documentation **"
TEMPDOC="`mktemp -p /tmp -d pqxxdoc.XXXXXXXXXX`"
cd -- "$TEMPDOC"
tar xzf "$SNAPSHOT"/libpqxx-*.tar.gz
cd libpqxx-*/

PREVIOUS=''
for d in `ls "$DOC" | grep '[0-9]'`
do
	PREVIOUS="$PREVIOUS --link-dest='$DOC/$d'"
done

rsync -r $PREVIOUS doc/html "$DOC/$PQXXVERSION"

cd /tmp
rm -rf "$TEMPDOC"

if test "$PARENT" = "trunk"
then
	# Move snapshot tarball to FTP directory.
	mv "$SNAPSHOT"/libpqxx-*.tar.* "$FTP/"
else
	echo "*** Remember: Build tarball and make available for upload ***"
fi

cd -- "$CHECKOUT"
svn commit -m "Forking release $PQXXVERSION, moving on to $NEXTVERSION."
cd /tmp
rm -rf -- "$CHECKOUT"

echo "** Done **"