Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /admin/prepare-release.sh
ViewVC logotype

Annotation of /admin/prepare-release.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4913 - (view) (download) (as text)

1 : jhr 4913 #!/bin/sh
2 :     #
3 :     # prepare a release by following steps 1 -- 10 of the
4 :     # "Building a Release" guide at http://smlnj.org/local/build-release.html
5 :     #
6 :     # Once this script is finished running, there should be bin/boot files
7 :     # for all supported architectures in base/system. The next step is
8 :     # updating the history file.
9 :     #
10 :     # usage:
11 :     # admin/prepare-release.sh [-d <date>] <version>
12 :     #
13 :    
14 :     function usage {
15 :     echo "usage: admin/prepare-release.sh [-d <date>] <version>"
16 :     exit 1
17 :     }
18 :    
19 :     THIS=$0
20 :     HERE=`pwd`
21 :    
22 :     if [ ! -x ./admin/prepare-release.sh ] ; then
23 :     echo "$THIS: !!! must run this script from root of SML/NJ tree"
24 :     exit 1
25 :     fi
26 :    
27 :     # get the DATE and VERSION for the release
28 :     #
29 :     if [ x"$1" = x-d ] ; then
30 :     if [ $# -ne 3 ] ; then
31 :     usage
32 :     fi
33 :     DATE=$2
34 :     VERSION=$3
35 :     elif [ $# -ne 1 ] ; then
36 :     usage
37 :     else
38 :     DATE=`date +"%B %d, %Y"`
39 :     VERSION=$1
40 :     fi
41 :    
42 :     # the log file
43 :     #
44 :     LOG=LOG-$VERSION
45 :    
46 :     # function to compile to fixed point and build an installation from
47 :     # the compiled code. This corresponds to steps 2 -- 6 in the guide.
48 :     #
49 :     function build_from_fixpt {
50 :     # compile to a fixed point
51 :     echo "compiling to a fixed point ..."
52 :     echo "***** cd base/system" >> $LOG
53 :     cd base/system
54 :     echo "***** ./fixpt" >> $LOG
55 :     ./fixpt >> $LOG 2>&1 || exit 1
56 :    
57 :     # makeml
58 :     echo "makeml ..."
59 :     echo "***** ./makeml" >> $LOG
60 :     ./makeml >> $LOG 2>&1 || exit 1
61 :    
62 :     # installml
63 :     echo "installml ..."
64 :     echo "***** ./installml -clean" >> $LOG
65 :     ./installml -clean >> $LOG 2>&1 || exit 1
66 :    
67 :     # install.sh
68 :     echo "config/install.sh ..."
69 :     echo "***** cd $HERE" >> $LOG
70 :     cd $HERE
71 :     echo "***** ./config/install.sh" >> $LOG
72 :     ./config/install.sh >> $LOG 2>&1 || exit 1
73 :     }
74 :    
75 :     # step 1: refresh output
76 :     #
77 :     echo "refresh sources ..."
78 :     echo "***** ./admin/refresh-all.sh" > $LOG
79 :     ./admin/refresh-all.sh >> $LOG 2>&1 || exit 1
80 :    
81 :     # steps 2-6
82 :     build_from_fixpt
83 :    
84 :     # step 7: set version and releasedate
85 :     echo "set version to $VERSION and releasedate to $DATE"
86 :     echo "***** cd config" >> $LOG
87 :     cd config
88 :     echo "***** echo $VERSION > version" >> $LOG
89 :     echo $VERSION > version
90 :     echo "***** echo $DATE > releasedate" >> $LOG
91 :     echo $DATE > releasedate
92 :     echo "***** svn commit -m \"updating version number to $VERSION\"" >> $LOG
93 :     svn commit -m "updating version number to $VERSION" >> $LOG 2>&1 || exit 1
94 :     echo "***** cd $HERE" >> $LOG
95 :     cd $HERE
96 :    
97 :     # step 8: repeat steps 2-6
98 :     build_from_fixpt
99 :    
100 :     # step 9: cross compile
101 :     echo "cross compile ..."
102 :     echo "***** cd base/system" >> $LOG
103 :     cd base/system
104 :     echo "***** ./allcross" >> $LOG
105 :     ./allcross >> $LOG 2>&1 || exit 1
106 :    
107 :     echo "done; the next step is to update the HISTORY.txt file"

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0