12 usage: $0 [-s] VERSION-NUMBER [REV]
14 This script frobs NEWS, makes a "release" commit, builds, runs tests
15 and creates an annotated tag for the release with VERSION-NUMBER.
17 If -s is given, then use the gpg-sign mechanism of "git tag". You
18 will need to have your gpg secret key handy.
20 if REV is given, it is the git revision to build into a release.
21 Default is origin/master.
23 No changes will be pushed upstream. This script will tell you how to
24 do this when it finishes.
30 if [ "-s" = "$1" ] ||
[ "--sign" = "$1" ]
39 usage
"No version number."
49 type=$
(git cat-file
-t "$rev" 2> /dev
/null ||
echo "unknown")
50 if ([ "tag" != "$type" ] && [ "commit" != "$type" ])
52 usage
"$rev is $type, not a tag or a commit."
58 usage
"Extra command-line arguments: $@"
61 sbcl_directory
="$(cd "$
(dirname $0)"; pwd)"
62 tmpfile
=$
(mktemp
-t sbcl-build-$
(date +%Y
%m
%d
)-XXXXXXXXX)
63 tmpdir
="$(mktemp -d -t sbcl-build-tree-$(date +%Y%m%d)-XXXXXXXXX)"
65 ## Check for messy work dirs:
67 echo "Fetching updates."
70 branch_name
="release-$(date '+%s')"
71 original_branch
="$(git describe --all --contains HEAD)"
72 trap "cd \"$sbcl_directory\" ; git checkout $original_branch" EXIT
73 git checkout
-b $branch_name $rev
75 echo "Checking that the tree is clean."
76 if ! [ $
(git status
--porcelain |
wc -l) = 0 ]
78 echo "There are uncommitted / unpushed changes in this checkout!"
83 ## Perform the necessary changes to the NEWS file:
86 sed -i.orig
"/^changes relative to sbcl-.*:/ s/changes/changes in sbcl-$version/ " NEWS
88 if ! grep "^changes in sbcl-$version relative to" NEWS
> /dev
/null
90 echo "NEWS munging failed!"
96 echo "Committing release version."
98 git commit
-m "$version: will be tagged as \"sbcl-$version\""
100 relnotes
=$tmpdir/sbcl-
$version-release-notes.txt
101 awk "BEGIN { state = 0 }
102 /^changes in sbcl-/ { state = 0 }
103 /^changes in sbcl-$version/ { state = 1 }
104 { if(state == 1) print \$0 }" < NEWS
> $relnotes
107 echo "Tagging as $tag"
108 git tag
$sign -F $relnotes "$tag"
110 SBCL_BUILDING_RELEASE_FROM
=HEAD
111 export SBCL_BUILDING_RELEASE_FROM
112 echo "Building SBCL, log: $tmpfile"
113 .
/make.sh
>$tmpfile 2>&1
115 if [ "SBCL $version" != "$(./src/runtime/sbcl --version)" ]
117 echo "Built version number doesn't match requested one:" &>2
119 echo " $(./src/runtime/sbcl --version)" &>2
123 built_version
=$
(.
/src
/runtime
/sbcl
--version |
awk '{print $2}')
125 echo "Running tests, log: $tmpfile"
127 sh .
/run-tests.sh
>>$tmpfile 2>&1
130 cp .
/src
/runtime
/sbcl
"$tmpdir"/sbcl-
$version-bin
131 cp .
/output
/sbcl.core
"$tmpdir"/sbcl-
$version.core
133 echo "Self-building, log: $tmpfile"
134 .
/make.sh
--xc-host="$tmpdir/sbcl-$version-bin --core $tmpdir/sbcl-$version.core --no-userinit --no-sysinit --disable-debugger" >>$tmpfile 2>&1
136 echo "Building docs, log: $tmpfile"
137 cd doc
&& sh .
/make-doc.sh
>$tmpfile 2>&1
141 rm -f "$tmpdir"/sbcl-
$version-bin "$tmpdir"/sbcl-
$version.core
143 cp -a "$sbcl_directory" "$tmpdir"/sbcl-
$version
145 echo "Building tarballs, log $tmpfile"
146 ln -s "$tmpdir"/sbcl-
$version "$tmpdir"/sbcl-
$version-x86-linux
148 sh sbcl-
$version/binary-distribution.sh sbcl-
$version-x86-linux >$tmpfile 2>&1
149 sh sbcl-
$version/html-distribution.sh sbcl-
$version >$tmpfile 2>&1
151 sh .
/distclean.sh
>$tmpfile 2>&1
153 sh sbcl-
$version/source-distribution.sh sbcl-
$version >$tmpfile 2>&1
155 echo "The SHA256 checksums of the following distribution files are:" > sbcl-
$version-crhodes
156 echo >> sbcl-
$version-crhodes
157 sha256sum sbcl-
$version*.
tar >> sbcl-
$version-crhodes
158 bzip2 "$tmpdir"/sbcl-
$version*.
tar
160 echo "Building bugmail."
161 bugmail
=sbcl-
$version-bugmail.txt
162 echo Bugs fixed by sbcl-
$version release
> $bugmail
163 for bugnum
in $
(egrep -o "#[1-9][0-9][0-9][0-9][0-9][0-9]+" $relnotes |
sed s
/#// | sort -n)
165 printf "\n bug %s\n status fixreleased" $bugnum >> $bugmail
169 echo SBCL distribution has been prepared
in "$tmpdir"
172 echo "Sanity check: git show $tag"
174 echo "git merge $branch_name && git push && git push --tags"
175 echo "git branch -d $branch_name"
176 echo "cd \"$tmpdir\""
177 echo gpg
-sta sbcl-
$version-crhodes
178 echo sftp crhodes
,sbcl@frs.sourceforge.net
179 echo \
* cd /home
/frs
/project
/s
/sb
/sbcl
/sbcl
180 echo \
* mkdir
$version
181 echo \
* chmod 775 $version
183 echo \
* put sbcl-
$version-crhodes.asc
184 echo \
* put sbcl-
$version-x86-linux-binary.
tar.bz2
185 echo \
* put sbcl-
$version-source.
tar.bz2
186 echo \
* put sbcl-
$version-documentation-html.
tar.bz2
187 echo \
* put sbcl-
$version-release-notes.txt
189 echo perform administrative tasks
:
191 echo \
* https
://sourceforge.net
/project
/admin
/?group_id
=1373
192 echo \
* In the File Manager interface
, click on the release notes
file
193 echo \ \ and tick the release notes box.
194 echo \
* In the File Manager interface
, click on the
source tarball and
195 echo \ \
select as default download
for all OSes.
196 echo \
* mail sbcl-announce
197 echo \
* check and send sbcl-
$version-bugmail.txt to edit@bugs.launchpad.net
198 echo \ \
'(sign: C-c RET s p)'
199 echo \
* update \
#lisp IRC topic
200 echo \
* update sbcl website