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 6227 - (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 : jhr 6043 LOG=$HERE/LOG-$VERSION
45 : jhr 4913
46 : jhr 6042 # determine the size of the installed version of SML that we are going to
47 :     # use to build the release.
48 :     #
49 :     if [ -x bin/sml ] ; then
50 :     case $(bin/sml @SMLsuffix) in
51 :     amd64-*) SZ_OPT="-64" ;;
52 :     *) SZ_OPT="-32" ;;
53 :     esac
54 :     else
55 :     echo "bin/sml is missing"
56 :     exit 1
57 :     fi
58 :    
59 : jhr 4913 # function to compile to fixed point and build an installation from
60 :     # the compiled code. This corresponds to steps 2 -- 6 in the guide.
61 :     #
62 :     function build_from_fixpt {
63 :     # compile to a fixed point
64 :     echo "compiling to a fixed point ..."
65 :     echo "***** cd base/system" >> $LOG
66 :     cd base/system
67 : jhr 6042 echo "***** ./fixpt $SZ_OPT" >> $LOG
68 :     ./fixpt $SZ_OPT >> $LOG 2>&1 || exit 1
69 : jhr 4913
70 :     # makeml
71 :     echo "makeml ..."
72 : jhr 6042 echo "***** ./makeml $SZ_OPT" >> $LOG
73 :     ./makeml $SZ_OPT >> $LOG 2>&1 || exit 1
74 : jhr 4913
75 :     # installml
76 :     echo "installml ..."
77 : jhr 6042 echo "***** ./installml $SZ_OPT -clean" >> $LOG
78 :     ./installml $SZ_OPT -clean >> $LOG 2>&1 || exit 1
79 : jhr 4913
80 :     # install.sh
81 :     echo "config/install.sh ..."
82 :     echo "***** cd $HERE" >> $LOG
83 :     cd $HERE
84 : jhr 6042 echo "***** ./config/install.sh $SZ_OPT" >> $LOG
85 :     ./config/install.sh $SZ_OPT >> $LOG 2>&1 || exit 1
86 : jhr 4913 }
87 :    
88 :     # step 1: refresh output
89 :     #
90 :     echo "refresh sources ..."
91 :     echo "***** ./admin/refresh-all.sh" > $LOG
92 :     ./admin/refresh-all.sh >> $LOG 2>&1 || exit 1
93 :    
94 :     # steps 2-6
95 :     build_from_fixpt
96 :    
97 :     # step 7: set version and releasedate
98 :     echo "set version to $VERSION and releasedate to $DATE"
99 :     echo "***** cd config" >> $LOG
100 :     cd config
101 :     echo "***** echo $VERSION > version" >> $LOG
102 :     echo $VERSION > version
103 :     echo "***** echo $DATE > releasedate" >> $LOG
104 :     echo $DATE > releasedate
105 :     echo "***** svn commit -m \"updating version number to $VERSION\"" >> $LOG
106 :     svn commit -m "updating version number to $VERSION" >> $LOG 2>&1 || exit 1
107 :     echo "***** cd $HERE" >> $LOG
108 :     cd $HERE
109 :    
110 :     # step 8: repeat steps 2-6
111 :     build_from_fixpt
112 :    
113 :     # step 9: cross compile
114 :     echo "cross compile ..."
115 :     echo "***** cd base/system" >> $LOG
116 :     cd base/system
117 :     echo "***** ./allcross" >> $LOG
118 : jhr 6227 ./allcross $SZ_OPT >> $LOG 2>&1 || exit 1
119 : jhr 4913
120 :     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