scripts/shepard.sh
author Eugene Ostroukhov <eugeneo@symbian.org>
Thu, 04 Nov 2010 15:22:02 -0700
changeset 495 0008ebdc0ec0
parent 453 cf2b238bfff2
permissions -rwxr-xr-x
Launch configurations were updated
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
453
cf2b238bfff2 use local repository
John Kern <johnk@symbian.org>
parents: 294
diff changeset
     6
LOCAL_REPO_DIR=/home/symbian/local-repo/wrttools
158
eea70b5d3a93 bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents: 95
diff changeset
     7
BASE_DIR=/home/symbian/scratch/build_dir
217
27fd31e7f051 bug 1872 - refined version string
John Kern <johnk@symbian.org>
parents: 215
diff changeset
     8
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
     9
HG_CMD=/usr/local/bin/hg
158
eea70b5d3a93 bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents: 95
diff changeset
    10
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
    11
158
eea70b5d3a93 bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents: 95
diff changeset
    12
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
    13
225
586ca734a1bc use build id instead of day of year
John Kern <johnk@symbian.org>
parents: 217
diff changeset
    14
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
    15
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
    16
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
    17
6bec0231e8d2 added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff changeset
    18
# display date and time 
6bec0231e8d2 added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff changeset
    19
date
6bec0231e8d2 added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff changeset
    20
6bec0231e8d2 added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff changeset
    21
# create build structure
6bec0231e8d2 added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff changeset
    22
225
586ca734a1bc use build id instead of day of year
John Kern <johnk@symbian.org>
parents: 217
diff changeset
    23
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
    24
453
cf2b238bfff2 use local repository
John Kern <johnk@symbian.org>
parents: 294
diff changeset
    25
# synchronize local cache with http://developer.symbian.org/oss/MCL/sftools/dev/eclipseenv/wrttools/ 
cf2b238bfff2 use local repository
John Kern <johnk@symbian.org>
parents: 294
diff changeset
    26
cd ${LOCAL_REPO_DIR}
cf2b238bfff2 use local repository
John Kern <johnk@symbian.org>
parents: 294
diff changeset
    27
${HG_CMD} pull
cf2b238bfff2 use local repository
John Kern <johnk@symbian.org>
parents: 294
diff changeset
    28
${HG_CMD} update 
cf2b238bfff2 use local repository
John Kern <johnk@symbian.org>
parents: 294
diff changeset
    29
65
6bec0231e8d2 added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff changeset
    30
# check out the code.
225
586ca734a1bc use build id instead of day of year
John Kern <johnk@symbian.org>
parents: 217
diff changeset
    31
cd ${WS_DIR}
453
cf2b238bfff2 use local repository
John Kern <johnk@symbian.org>
parents: 294
diff changeset
    32
${HG_CMD} clone ${LOCAL_REPO_DIR}
65
6bec0231e8d2 added script to drive the builds. updated others to accept parameters
John Kern <johnk@symbian.org>
parents:
diff changeset
    33
158
eea70b5d3a93 bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents: 95
diff changeset
    34
cd ${SOURCE_DIR}/scripts
91
ca4b5c63386b provide win32 and macosx tarballs.
John Kern <johnk@symbian.org>
parents: 86
diff changeset
    35
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
    36
# 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
    37
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
    38
244
1850f7b7ffc7 fix for bug 1890 - about box
John Kern <johnk@symbian.org>
parents: 242
diff changeset
    39
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
    40
215
c9394af976fe bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents: 165
diff changeset
    41
# 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
    42
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
    43
do
217
27fd31e7f051 bug 1872 - refined version string
John Kern <johnk@symbian.org>
parents: 215
diff changeset
    44
	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
    45
done
c9394af976fe bug 1872 - fix installation details dialog
John Kern <johnk@symbian.org>
parents: 165
diff changeset
    46
286
bb5a56737bfb bug 2386 - update version string
John Kern <johnk@symbian.org>
parents: 244
diff changeset
    47
# 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
    48
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
    49
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
    50
158
eea70b5d3a93 bug 1901 - fix for nightly build
John Kern <johnk@symbian.org>
parents: 95
diff changeset
    51
${ANT_CMD} -DbuildDirectory=${BUILD_DIR} -DsourceDirectory=${SOURCE_DIR}
91
ca4b5c63386b provide win32 and macosx tarballs.
John Kern <johnk@symbian.org>
parents: 86
diff changeset
    52
242
0b6dbc2fc499 renamed zip file directory to N.WrtIde
John Kern <johnk@symbian.org>
parents: 228
diff changeset
    53
cd ${BUILD_DIR}/N.WrtIde
228
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    54
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    55
# bug 2165 - add a timestamp to filename 
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    56
for file in *.zip
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    57
do
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    58
  if [ -f $file ] ; then
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    59
    file_original=`basename $file`
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    60
    # name without extension
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    61
    file_stamped=${file_original%\.*}-${ECLIPSE_TIMESTAMP}.zip
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    62
    mv ${file_original} ${file_stamped}
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    63
  fi ;
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    64
done
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    65
913c9751c067 fix for bug 2165 - rename zip files
John Kern <johnk@symbian.org>
parents: 225
diff changeset
    66