forked from booktype/Booktype
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen-snapshot.sh
More file actions
executable file
·64 lines (45 loc) · 1.9 KB
/
gen-snapshot.sh
File metadata and controls
executable file
·64 lines (45 loc) · 1.9 KB
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
#/bin/sh
# Script for generating nightly Booktype snapshot packages
# Run from the directory containg the files checked out from git
VERSION=1.6.0~$(date "+%Y%m%d")
BUILDDEST=/tmp/booktype-${VERSION}/
git checkout devel
git pull
echo "cleaning up previous build..."
rm -rf /tmp/booktype-*
mkdir ${BUILDDEST}
echo "copying files to temporary directory..."
cp -a * ${BUILDDEST} || exit
cd ${BUILDDEST} || exit
# Set the version of the snapshot package
sed -i "1s:(1.6.0-1):(${VERSION}):g" debian/changelog
# Fixes for 1.6.0 #############
# remove directories not needed by users
rm -r tests
rm -r tools
# moved to debian/copyright
rm LICENSE.txt
rm lib/booki/site_static/js/tiny_mce/classes/firebug/FIREBUG.LICENSE
rm lib/booki/site_static/js/tiny_mce/license.txt
rm lib/booki/site_static/js/jquery/AUTHORS.txt
rm lib/booki/site_static/js/jquery/MIT-LICENSE.txt
rm lib/booki/site_static/js/jquery/GPL-LICENSE.txt
# remove Windows thumbnail files
rm lib/booki/site_static/images/jquerybubblepopup-theme/all-black/Thumbs.db
rm lib/booki/site_static/images/jquerybubblepopup-theme/all-black/ie/Thumbs.db
rm lib/booki/site_static/images/jquerybubblepopup-theme/green/Thumbs.db
rm lib/booki/site_static/images/jquerybubblepopup-theme/orange/Thumbs.db
rm lib/booki/site_static/images/jquerybubblepopup-theme/violet/Thumbs.db
rm lib/booki/site_static/images/jquerybubblepopup-theme/yellow/Thumbs.db
# fix permissions
chmod +x scripts/cron_reports.sh.original
chmod +x scripts/cron_reports_weekly.sh.original
chmod -x lib/booki/site_static/js/editor.js
chmod -x lib/booki/site_static/images/feed-icon-14x14.png
#############################
echo "running the build..."
debuild -b -uc -us $@ || exit
# copy the new package to the public server
# scp /tmp/booktype_${VERSION}_all.deb apt.sourcefabric.org:/var/www/apt/snapshots/
# copy the build log too
# scp /tmp/booktype_${VERSION}_amd64.build apt.sourcefabric.org:/var/www/apt/snapshots/