forked from get-iplayer/get_iplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.sh
executable file
·34 lines (28 loc) · 917 Bytes
/
web.sh
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
#!/bin/sh
BASEURL=http://www.infradead.org/get_iplayer
git pull -q
TAGS="`git tag -l 'v*' | sort -r`"
THISTAG=
for NEWTAG in $TAGS; do
OLDTAG=$THISTAG
THISTAG=$NEWTAG
if [ "$OLDTAG" = "" ]; then
echo ${THISTAG##v} > VERSION.new
LATESTTAG=$THISTAG
continue;
fi
# Compare $OLDTAG with $THISTAG
git show --format=%aD $OLDTAG -- | head -1 | sed "s/^\(.*\)..:..:.. [+-]..../Version ${OLDTAG##v} -- \1/"
git log $THISTAG..$OLDTAG --pretty=oneline | sed 's/[0-9a-f]*/ \*/' | grep -v 'Tag version '
echo
if [ ! -d $OLDTAG ]; then
git archive --format=tar $OLDTAG --prefix=$OLDTAG/ | tar xf -
echo "bin $BASEURL/$OLDTAG/get_iplayer" > MANIFEST.$OLDTAG
for a in $OLDTAG/plugins/*.plugin ; do
echo "plugins $BASEURL/$a" >> MANIFEST.$OLDTAG
done
fi
done > CHANGELOG.new
mv CHANGELOG.new CHANGELOG-get_iplayer
mv VERSION.new VERSION-get_iplayer
ln -sfn $LATESTTAG latest