scripts/shepard.sh
author Eugene Ostroukhov <eugeneo@symbian.org>
Thu, 02 Sep 2010 16:31:16 -0700
changeset 485 df4f55e8569e
parent 294 e7cc5de6bd97
child 453 cf2b238bfff2
permissions -rwxr-xr-x
Fixed copyright headers and removed unneeded WRT mentions from TMW code
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
25813fb4bf1c build linux product
John Kern <johnk@symbian.org>
parents: 65
diff changeset
     3
set -x 
25813fb4bf1c build linux product
John Kern <johnk@symbian.org>
parents: 65
diff changeset
     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}
294
e7cc5de6bd97 pulling builds from developer.symbian.org
John Kern <johnk@symbian.org>
parents: 286
diff changeset
    26
${HG_CMD} clone http://developer.symbian.org/oss/MCL/sftools/dev/eclipseenv/wrttools/ 
65
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
244
1850f7b7ffc7 fix for bug 1890 - about box
John Kern <johnk@symbian.org>
parents: 242
diff changeset
    33
cat ${SOURCE_DIR}/scripts/plugin.properties.SED | sed -e s#SED_BUILD_ID#${ECLIPSE_TIMESTAMP}#g > ${SOURCE_DIR}/org.symbian.tools.wrttools.product/plugin.properties
1850f7b7ffc7 fix for bug 1890 - about box
John Kern <johnk@symbian.org>
parents: 242
diff changeset
    34
215
c9394af976fe bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents: 165
diff changeset
    35
# 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
    36
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
    37
do
217
27fd31e7f051 bug 1872 - refined version string
John Kern <johnk@symbian.org>
parents: 215
diff changeset
    38
	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
    39
done
c9394af976fe bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents: 165
diff changeset
    40
286
bb5a56737bfb bug 2386 - update version string
John Kern <johnk@symbian.org>
parents: 244
diff changeset
    41
# wrt-ide.product has the orginal reference to 1.0.0.qualifier. 
215
c9394af976fe bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents: 165
diff changeset
    42
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
    43
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
    44
158
eea70b5d3a93 bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents: 95
diff changeset
    45
${ANT_CMD} -DbuildDirectory=${BUILD_DIR} -DsourceDirectory=${SOURCE_DIR}
91
ca4b5c63386b provide win32 and macosx tarballs.
John Kern <johnk@symbian.org>
parents: 86
diff changeset
    46
242
0b6dbc2fc499 renamed zip file directory to N.WrtIde
John Kern <johnk@symbian.org>
parents: 228
diff changeset
    47
cd ${BUILD_DIR}/N.WrtIde
228
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    48
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    49
# bug 2165 - add a timestamp to filename 
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    50
for file in *.zip
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    51
do
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    52
  if [ -f $file ] ; then
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    53
    file_original=`basename $file`
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    54
    # name without extension
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    55
    file_stamped=${file_original%\.*}-${ECLIPSE_TIMESTAMP}.zip
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    56
    mv ${file_original} ${file_stamped}
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    57
  fi ;
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    58
done
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    59
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    60