4 SFUSER
=${SFUSER:-$USER}
8 ## Parse command line arguments
17 usage: $0 [-s] VERSION-NUMBER [REV]
19 This script frobs NEWS, makes a "release" commit + tag of the
20 repository in \$PWD/release.sbcl .
22 It then clones the repository to a new clean directory and does the
24 - Builds source tarball
25 - Builds a SBCL for self-build
26 - Builds x86-64 binaries
28 - Pushes the repository
29 - Builds and uploads the documentation
31 If -s is given, then use the gpg-sign mechanism of "git tag". You
32 will need to have your gpg secret key handy.
34 if REV is given, it is the git revision to build into a release.
35 Default is origin/master.
39 SFUSER: Sourceforge username. Defaults to \$USER
40 SBCL_RELEASE_DIR: Absolute path to directory containing all the build
41 artifacts. If not defined, a new build directory is created in \$PWD.
47 if [ "-s" = "$1" ] ||
[ "--sign" = "$1" ]
54 ## Verify version number
58 usage
"No version number."
61 echo $VERSION | perl
-pe 'die "Invalid version number: $_\n" if !/^\d+\.\d+\.\d+$/'
69 type=$
(git cat-file
-t "$rev" 2> /dev
/null ||
echo "unknown")
70 if ([ "tag" != "$type" ] && [ "commit" != "$type" ])
72 usage
"$rev is $type, not a tag or a commit."
78 usage
"Extra command-line arguments: $@"
81 SBCL_RELEASE_DIR
=${SBCL_RELEASE_DIR:-$(mktemp -d $PWD/sbcl-release-dir-$(date +%Y%m%d)-XXXXXXXXX)}
82 SBCL_DIR
=$SBCL_RELEASE_DIR/sbcl-
$VERSION
83 GIT_DIR
=$PWD/release.sbcl
84 LOGFILE
=$SBCL_RELEASE_DIR/log.txt
86 ## Frob the git repository, and clone the repo to a clean build directory.
88 if [ ! -d $SBCL_DIR ]; then
91 sbcl_directory
="$(cd "$
(dirname $0)"; pwd)"
93 branch_name
="release-$(date '+%s')"
94 original_branch
="$(git describe --all --contains HEAD)"
96 echo "Checking that the tree is clean."
97 if ! [ $
(git status
--porcelain |
wc -l) = 0 ]
99 echo "There are uncommitted / unpushed changes in this checkout!"
104 ## Perform the necessary changes to the NEWS file:
107 sed -i.orig
"/^changes relative to sbcl-.*:/ s/changes/changes in sbcl-$VERSION/ " NEWS
109 if ! grep "^changes in sbcl-$VERSION relative to" NEWS
> /dev
/null
111 echo "NEWS munging failed!"
119 echo "Committing release version."
121 git commit
-m "$VERSION: will be tagged as \"sbcl-$VERSION\""
123 ## Make release notes
125 if [ ! -f $SBCL_RELEASE_DIR/sbcl-
$VERSION-release-notes.txt
]; then
126 awk "BEGIN { state = 0 }
127 /^changes in sbcl-/ { state = 0 }
128 /^changes in sbcl-$VERSION/ { state = 1 }
129 { if(state == 1) print \$0 }" < $GIT_DIR/NEWS
> $SBCL_RELEASE_DIR/sbcl-
$VERSION-release-notes.txt
135 echo "Tagging as $tag"
136 git tag
$sign -F $SBCL_RELEASE_DIR/sbcl-
$VERSION-release-notes.txt
"$tag"
138 git clone
$GIT_DIR $SBCL_DIR
141 ## Make the source tarball.
143 if [ ! \
( -f $SBCL_RELEASE_DIR/sbcl-
$VERSION-source.
tar -o -f $SBCL_RELEASE_DIR/sbcl-
$VERSION-source.
tar.bz2 \
) ]; then
145 $SBCL_DIR/generate-version.sh
151 sh sbcl-
$VERSION/source-distribution.sh sbcl-
$VERSION
153 mv $SBCL_DIR $SBCL_DIR.git
155 tar xvf sbcl-
$VERSION-source.
tar
158 ## Build x86-64 binary for bootstrap.
160 if [ ! -d $SBCL_RELEASE_DIR/bin
]; then
162 nice
-20 .
/make.sh
>$LOGFILE 2>&1
165 nice
-20 sh .
/run-tests.sh
>>$LOGFILE 2>&1
166 mkdir
-p $SBCL_RELEASE_DIR/bin
167 cp $SBCL_DIR/src
/runtime
/sbcl
$SBCL_RELEASE_DIR/bin
/sbcl
168 cp $SBCL_DIR/output
/sbcl.core
$SBCL_RELEASE_DIR/bin
/sbcl.core
171 ## Build x86-64 release binary.
173 if [ ! -d $SBCL_RELEASE_DIR/sbcl-
$VERSION-x86-64-linux ]; then
176 nice
-20 .
/make.sh
"$SBCL_RELEASE_DIR/bin/sbcl --core $SBCL_RELEASE_DIR/bin/sbcl.core --no-userinit" >> $LOGFILE 2>&1
177 cd doc
&& sh .
/make-doc.sh
180 ln -s $SBCL_DIR $SBCL_RELEASE_DIR/sbcl-
$VERSION-x86-64-linux
181 sh
$SBCL_DIR/binary-distribution.sh sbcl-
$VERSION-x86-64-linux
182 sh
$SBCL_DIR/html-distribution.sh sbcl-
$VERSION
185 ## Build x86 release binary.
187 #if [ ! -d $SBCL_RELEASE_DIR/sbcl-$VERSION-x86-linux ]; then
190 # export SBCL_ARCH=x86
191 # export PATH=/scratch/src/release/x86-gcc-wrapper:$PATH
192 # nice -20 ./make.sh "$SBCL_RELEASE_DIR/bin/sbcl --core $SBCL_RELEASE_DIR/bin/s#bcl.core --no-userinit" >> $LOGFILE 2>&1
194 # nice -20 sh ./run-tests.sh >>$LOGFILE 2>&
196 # cd $SBCL_RELEASE_DIR
197 # ln -s $SBCL_DIR $SBCL_RELEASE_DIR/sbcl-$VERSION-x86-linux
198 # sh $SBCL_DIR/binary-distribution.sh sbcl-$VERSION-x86-linux
203 if [ ! -f $SBCL_RELEASE_DIR/sbcl-
$VERSION-$SFUSER ]; then
205 echo "The SHA256 checksums of the following distribution files are:" > sbcl-
$VERSION-$SFUSER
206 echo >> sbcl-
$VERSION-$SFUSER
207 sha256sum sbcl-
$VERSION*.
tar >> sbcl-
$VERSION-$SFUSER
208 bzip2 sbcl-
$VERSION*.
tar
213 if [ ! -f $SBCL_RELEASE_DIR/sbcl-
$VERSION-bugmail.txt
]; then
215 echo Bugs fixed by sbcl-
$VERSION release
> sbcl-
$VERSION-bugmail.txt
216 for bugnum
in $
(egrep -o "#[1-9][0-9][0-9][0-9][0-9][0-9]+" sbcl-
$VERSION-release-notes.txt |
sed s
/#// | sort -n); do
217 printf "\n bug %s\n status fixreleased" $bugnum >> sbcl-
$VERSION-bugmail.txt
219 echo >> sbcl-
$VERSION-bugmail.txt
224 if [ ! -f $SBCL_RELEASE_DIR/sbcl-
$VERSION-$SFUSER.asc
]; then
226 gpg
-sta $SBCL_RELEASE_DIR/sbcl-
$VERSION-$SFUSER
231 if [ ! -f $SBCL_RELEASE_DIR/uploaded
]; then
233 read -n 1 -p "Ok to upload? " A
; echo
234 if [ $A \
!= "y" ]; then
239 cat > $SBCL_RELEASE_DIR/sftp-batch
<<EOF
240 cd /home/frs/project/s/sb/sbcl/sbcl
244 put sbcl-$VERSION-$SFUSER.asc
245 put sbcl-$VERSION-x86-64-linux-binary.tar.bz2
246 put sbcl-$VERSION-source.tar.bz2
247 put sbcl-$VERSION-documentation-html.tar.bz2
248 put sbcl-$VERSION-release-notes.txt
249 put sbcl-$VERSION-release-notes.txt README
251 sftp
-b $SBCL_RELEASE_DIR/sftp-batch
$SFUSER,sbcl@frs.sourceforge.net
257 if [ ! -f $SBCL_RELEASE_DIR/sbcl-git-pushed
]; then
259 git
diff origin || true
261 read -n 1 -p "Ok? " A
; echo
263 if [ $A = "y" ]; then
266 touch $SBCL_RELEASE_DIR/sbcl-git-pushed
272 ## Build + push documentation
274 if [ ! -f $SBCL_RELEASE_DIR/sbcl-page-uploaded
]; then
275 cp -af $GIT_DIR/..
/sbcl-page
$SBCL_RELEASE_DIR
276 cd $SBCL_RELEASE_DIR/sbcl-page
/sbcl
278 cd $SBCL_RELEASE_DIR/sbcl-page
282 perl
-i -pe "s/(:x86-64 :linux :available) \".*\"/\$1 \"$VERSION\"/" \
283 platform-support-platforms.lisp
285 export LC_CTYPE
=en_GB.utf8
287 ## FIXME: this depends on the sbcl-$VERSION tag being visible on sf
288 ## git, not just the local machine (because of the submodule), which
289 ## means that the release.sbcl should have as its origin sf not
290 ## another local copy.
291 nice
-20 make manual generate-pages SBCL_TAG
=sbcl-
$VERSION >>$LOGFILE 2>&1
295 git
diff || COMMIT
=true
296 links
-dump platform-table.html
298 read -n 1 -p "Ok? " A
; echo
300 if [ $A = "y" ]; then
302 git commit
-a -m "Update for $VERSION"
305 make upload-pages upload-manual SBCL_TAG
=sbcl-
$VERSION
306 touch $SBCL_RELEASE_DIR/sbcl-page-uploaded
316 echo perform administrative tasks
:
318 echo \
* visit https
://sourceforge.net
/projects
/sbcl
/files
/
319 echo \
* select sbcl
-> $VERSION -> "view details" for the
source
320 echo \ \ tarball
, "Select all" and Save
321 echo \
* mail sbcl-announce
322 echo \
* check and send sbcl-
$VERSION-bugmail.txt to edit@bugs.launchpad.net
323 echo \ \
'(sign: C-c RET s p)'
324 echo "* update #lisp IRC topic (requires channel ops)"