]>
code.delx.au - gnu-emacs-elpa/blob - admin/update-archive.sh
7 a_email
="" #info-gnu-emacs@gnu.org
10 while [ $# -gt 0 ]; do
12 "--announce") announce
=yes; a_email
="$2"; shift ;;
14 makelog
="$(pwd)/make.log"
24 mx_gnu_org
="$(host -t mx gnu.org | sed 's/.*[ ]//')"
25 (sleep 5; echo "HELO elpa.gnu.org"
26 sleep 1; echo "MAIL FROM: <elpa@elpa.gnu.org>"
27 sleep 1; echo "RCPT TO: <$to>"
30 From: ELPA update <do.not.reply@elpa.gnu.org>
36 echo "."; sleep 1) |
telnet "$mx_gnu_org" smtp
39 # Send an email to warn about a problem.
42 if [ "" = "$makelog" ]; then
45 send_mail
"emacs-elpa-diffs@gnu.org" "$title" <"$makelog"
51 if [ "yes" != "$announce" ]; then return; fi
53 eval $
(echo "$pv" |
sed -e 's/^\(.*\)-\([^-]*\)$/pkg="\1" ver="\2"/')
54 test "$pkg" && test "$ver" || signal_error
"bad PKG-VER: $pv"
55 send_mail
"$a_email" "[GNU ELPA] $pkg version $ver" <<ENDDOC
56 Version $ver of GNU ELPA package $pkg has just been released.
57 You can now find it in M-x package-list RET.
59 More at http://elpa.gnu.org/packages/$pkg.html
66 git pull || signal_error
"git pull failed"
68 # Remember we're inside the "elpa" branch which we don't want to trust,
69 # So always refer to the makefile and admins files from $builddir".
71 # Setup and update externals.
72 emacs
--batch -l "$buildir/admin/archive-contents.el" \
73 -f archive-add
/remove
/update-externals
75 make -f "$buildir/GNUmakefile" check_copyrights ||
76 signal_error
"check_copyright failed"
85 --exclude='*-autoloads.el' \
88 # Refresh the ChangeLog files. This needs to be done in
89 # the source tree, because it needs the VCS data!
90 emacs
-batch -l admin
/archive-contents.el \
91 -eval '(archive-prepare-packages "../elpa")'
94 rm -rf archive
# In case there's one left over!
95 make archive-full ||
{
96 signal_error
"make archive-full failed"
98 latest
="emacs-packages-latest.tgz"
100 GZIP
=--best tar zcf
"$latest" packages
)
102 mkdir
-p staging
/packages
103 # Not sure why we have `staging-old', but let's keep it for now.
105 cp -a staging staging-old
106 # Move new files into place but don't throw out old package versions.
107 for f
in build
/archive
/packages
/*; do
110 dst
="staging/packages/$pv"
111 # Actually, let's never overwrite an existing version. So changes can
112 # be installed without causing a new package to be built until the
113 # version field is changed. Some files need to be excluded from the
114 # "immutable" policy, most importantly "archive-contents"
115 # and "*-readme.txt".
117 */archive-contents |
*-readme.txt
) mv "$f" "$dst" ;;
122 # FIXME: Add a tag to remember the precise code used.
127 mv build
/archive
/"$latest" staging
/
128 rm -rf build
/archive
)
130 # Make the HTML and readme.txt files.
131 (cd ..
/staging
/packages
132 emacs
--batch -l ..
/..
/build
/admin
/archive-contents.el \
133 --eval '(batch-html-make-index)')