author | John Kern <johnk@symbian.org> |
Fri, 05 Mar 2010 15:43:17 -0800 | |
changeset 228 | 913c9751c067 |
parent 225 | 586ca734a1bc |
child 242 | 0b6dbc2fc499 |
permissions | -rwxr-xr-x |
65
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
1 |
#!/bin/sh |
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
2 |
|
78 | 3 |
set -x |
4 |
||
65
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
5 |
SCRIPTS_DIR=/home/symbian/wrttools/scripts |
158
eea70b5d3a93
bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents:
95
diff
changeset
|
6 |
BASE_DIR=/home/symbian/scratch/build_dir |
217
27fd31e7f051
bug 1872 - refined version string
John Kern <johnk@symbian.org>
parents:
215
diff
changeset
|
7 |
ECLIPSE_TIMESTAMP=`date +%Y%m%d%H%M%S`-${BUILD_NUMBER:-NO_BUILD_NUMBER} |
65
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
8 |
HG_CMD=/usr/local/bin/hg |
158
eea70b5d3a93
bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents:
95
diff
changeset
|
9 |
ANT_CMD=/usr/local/apache-ant-1.8.0/bin/ant |
91
ca4b5c63386b
provide win32 and macosx tarballs.
John Kern <johnk@symbian.org>
parents:
86
diff
changeset
|
10 |
|
158
eea70b5d3a93
bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents:
95
diff
changeset
|
11 |
export PATH=.:/usr/java/jdk1.6.0_18/bin:/usr/local/apache-ant-1.8.0/bin/ant:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
eea70b5d3a93
bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents:
95
diff
changeset
|
12 |
|
225
586ca734a1bc
use build id instead of day of year
John Kern <johnk@symbian.org>
parents:
217
diff
changeset
|
13 |
WS_DIR=${BASE_DIR}/${BUILD_NUMBER:-NO_BUILD_NUMBER}/workspace |
586ca734a1bc
use build id instead of day of year
John Kern <johnk@symbian.org>
parents:
217
diff
changeset
|
14 |
export SOURCE_DIR=${BASE_DIR}/${BUILD_NUMBER:-NO_BUILD_NUMBER}/workspace/wrttools |
586ca734a1bc
use build id instead of day of year
John Kern <johnk@symbian.org>
parents:
217
diff
changeset
|
15 |
export BUILD_DIR=${BASE_DIR}/${BUILD_NUMBER:-NO_BUILD_NUMBER}/eclipse.build |
65
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
16 |
|
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
17 |
# display date and time |
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
18 |
date |
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
19 |
|
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
20 |
# create build structure |
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
21 |
|
225
586ca734a1bc
use build id instead of day of year
John Kern <johnk@symbian.org>
parents:
217
diff
changeset
|
22 |
mkdir -p ${WS_DIR} |
65
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
23 |
|
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
24 |
# check out the code. |
225
586ca734a1bc
use build id instead of day of year
John Kern <johnk@symbian.org>
parents:
217
diff
changeset
|
25 |
cd ${WS_DIR} |
65
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
26 |
${HG_CMD} clone http://sym-mrswitch:8000 wrttools |
6bec0231e8d2
added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
27 |
|
158
eea70b5d3a93
bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents:
95
diff
changeset
|
28 |
cd ${SOURCE_DIR}/scripts |
91
ca4b5c63386b
provide win32 and macosx tarballs.
John Kern <johnk@symbian.org>
parents:
86
diff
changeset
|
29 |
|
165
63829d1fe965
build.properties is now a template. This allows the build process to replace strings. Any token prefixed with SED should be replaced by the build script. The output goes to build.properties.
John Kern <johnk@symbian.org>
parents:
158
diff
changeset
|
30 |
# set the build directory in the build.properties files. |
63829d1fe965
build.properties is now a template. This allows the build process to replace strings. Any token prefixed with SED should be replaced by the build script. The output goes to build.properties.
John Kern <johnk@symbian.org>
parents:
158
diff
changeset
|
31 |
cat ${SOURCE_DIR}/scripts/build.properties.SED | sed -e s#SED_BUILD_DIR#${BUILD_DIR}#g > ${SOURCE_DIR}/scripts/build.properties |
63829d1fe965
build.properties is now a template. This allows the build process to replace strings. Any token prefixed with SED should be replaced by the build script. The output goes to build.properties.
John Kern <johnk@symbian.org>
parents:
158
diff
changeset
|
32 |
|
215
c9394af976fe
bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents:
165
diff
changeset
|
33 |
# bug fix for 1872. [testcase: go to about box. click on installation details. Do you see an error? ] |
c9394af976fe
bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents:
165
diff
changeset
|
34 |
for f in `find ${SOURCE_DIR} -name MANIFEST.MF` |
c9394af976fe
bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents:
165
diff
changeset
|
35 |
do |
217
27fd31e7f051
bug 1872 - refined version string
John Kern <johnk@symbian.org>
parents:
215
diff
changeset
|
36 |
cat $f | sed -e s#qualifier#"${ECLIPSE_TIMESTAMP}"#g > ${f} |
215
c9394af976fe
bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents:
165
diff
changeset
|
37 |
done |
c9394af976fe
bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents:
165
diff
changeset
|
38 |
|
c9394af976fe
bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents:
165
diff
changeset
|
39 |
# wrt-ide.product has the orginal reference to 1.0.0.qualifier. Try deleting .qualifier |
c9394af976fe
bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents:
165
diff
changeset
|
40 |
prod_file=${SOURCE_DIR}/org.symbian.tools.wrttools.product/wrt-ide.product |
217
27fd31e7f051
bug 1872 - refined version string
John Kern <johnk@symbian.org>
parents:
215
diff
changeset
|
41 |
cat $prod_file | sed -e s#qualifier#"${ECLIPSE_TIMESTAMP}"#g > $prod_file |
215
c9394af976fe
bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents:
165
diff
changeset
|
42 |
|
158
eea70b5d3a93
bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents:
95
diff
changeset
|
43 |
${ANT_CMD} -DbuildDirectory=${BUILD_DIR} -DsourceDirectory=${SOURCE_DIR} |
91
ca4b5c63386b
provide win32 and macosx tarballs.
John Kern <johnk@symbian.org>
parents:
86
diff
changeset
|
44 |
|
228
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
45 |
cd ${BUILD_DIR}/N.TestBuild |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
46 |
|
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
47 |
# bug 2165 - add a timestamp to filename |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
48 |
for file in *.zip |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
49 |
do |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
50 |
if [ -f $file ] ; then |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
51 |
file_original=`basename $file` |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
52 |
# name without extension |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
53 |
file_stamped=${file_original%\.*}-${ECLIPSE_TIMESTAMP}.zip |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
54 |
mv ${file_original} ${file_stamped} |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
55 |
fi ; |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
56 |
done |
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
57 |
|
913c9751c067
fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents:
225
diff
changeset
|
58 |