forked from mlichvar/chrony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_release
executable file
·51 lines (35 loc) · 887 Bytes
/
make_release
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
#!/bin/sh
LANG=C.UTF-8
export LANG
if [ $# -ne 1 ]; then
echo "Usage : $0 <version>"
exit 2
fi
version=$1
tag=$version
subdir=chrony-${version}
umask 022
if [ ! -d .git ]; then
echo "No .git subdirectory?"
exit 3
fi
[ -d RELEASES ] || mkdir RELEASES
rm -rf RELEASES/$subdir
if [ $version != test ]; then
git tag -s $tag || exit 1
else
tag=HEAD
fi
git archive --format=tar --prefix=RELEASES/${subdir}/ $tag | \
tar xf - || exit 1
cd RELEASES/$subdir || exit 1
echo $version > version.txt
./configure && make -C doc man txt || exit 1
iconv -f utf-8 -t ascii//TRANSLIT < doc/installation.txt > INSTALL
iconv -f utf-8 -t ascii//TRANSLIT < doc/faq.txt > FAQ
make distclean
rm -f make_release .gitignore
cd ..
tar cv --owner root --group root $subdir | gzip -9 > ${subdir}.tar.gz
[ $version != test ] && \
gpg -b -a -o ${subdir}-tar-gz-asc.txt ${subdir}.tar.gz