source: project/maintenance/chicken-dev-snapshot.sh @ 11269

Last change on this file since 11269 was 11269, checked in by Ivan Raikov, 12 years ago

cd to trunk directory before building linux binary tarball.

  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#! /bin/sh
2
3tmpdir=/home/chicken/tmp/chicken-daily-snapshot
4chickenpath=$HOME
5csi=$chickenpath/bin/csi
6chicken=$chickenpath/bin/chicken
7todaydir=`date +%Y/%m/%d`
8today=`date +%Y%m%d`
9wwwbasedir=/var/www/localhost/htdocs/dev-snapshots
10wwwdir=$wwwbasedir/$todaydir
11PATH=$HOME/bin:/opt/mingw32/bin:$PATH
12
13set -x
14
15if [ ! -e "$tmpdir" ]; then
16    mkdir -p $tmpdir || exit
17fi
18
19cd $tmpdir || exit 1
20rm -rf $tmpdir/chicken* $tmpdir/release* $tmpdir/stream-wiki $tmpdir/wiki
21
22### Fetching chicken from trunk
23svn co --username anonymous --password "" https://localhost/svn/chicken-eggs/chicken/trunk
24svn co --username anonymous --password "" https://localhost/svn/chicken-eggs/release/3/stream-wiki/trunk stream-wiki
25
26## determine version in trunk
27version=`sed -r 's/[^0-9]*(([0-9]+\.)+[0-9]*).*/\1/' $tmpdir/trunk/version.scm`
28
29## determine version of current snapshot
30current=`wget 'http://chicken.wiki.br/dev-snapshots/current' -q -O - | grep -E 'chicken-[0-9]\.[0-9]+\.*[0-9]*\.tar\.gz' | sed 's/.*a href="\(chicken-\(.*\)\.tar\.gz\)".*/\2/'`
31
32## only build the snapshot if version > current
33if test "$current" = "$version"; then
34  exit 0
35fi
36
37### generate the manual and ChangeLog
38cd $tmpdir/trunk
39$csi -s scripts/makehtml.scm --extension-path=$tmpdir/stream-wiki/extensions --pdf
40$csi -s scripts/maketexi.scm
41svn log >ChangeLog
42
43### generating the Windows binary tarball
44make PLATFORM=linux clean
45make PLATFORM=linux confclean
46LD_LIBRARY_PATH=$chickenlib make PLATFORM=cross-linux-mingw PREFIX=/chicken CHICKEN=$chickenpath/bin/chicken DESTDIR=crosschicken install
47cd crosschicken
48zip -r chicken-${version}-mingw32-x86.zip chicken
49
50### generating the linux binary tarball
51cd $tmpdir/trunk
52make PLATFORM=linux clean
53make PLATFORM=linux confclean
54LD_LIBRARY_PATH=$chickenlib make PLATFORM=linux PREFIX=/usr/local CHICKEN=$chickenpath/bin/chicken DESTDIR=linuxchicken install
55tar -czf chicken-${version}-linux-x86.tar.gz -C linuxchicken .
56
57### generate the source snapshot
58cd $tmpdir/trunk
59$csi -s scripts/makedist.scm PREFIX=$chickenpath
60
61
62### Publishing
63error=0
64mkdir -p $wwwdir
65cp $tmpdir/trunk/chicken-${version}.tar.gz $wwwdir || error=1
66cp $tmpdir/trunk/chicken.pdf $wwwdir || error=1
67cp $tmpdir/trunk/ChangeLog $wwwdir/ChangeLog.txt || error=1
68cp $tmpdir/trunk/NEWS $wwwdir/NEWS || error=1
69cp $tmpdir/trunk/crosschicken/chicken-${version}-mingw32-x86.zip $wwwdir || error=1
70cp $tmpdir/trunk/chicken-${version}-linux-x86.tar.gz $wwwdir || error=1
71
72if test "$error" -eq "0"; then
73  rm -f $wwwbasedir/current
74  ln -sf $wwwdir $wwwbasedir/current
75fi
76
Note: See TracBrowser for help on using the repository browser.