]>
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 pkg
="$(echo "$pv" | sed -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\1/')"
54 ver
="$(echo "$pv" | sed -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\2/')"
55 if [ -z "$pkg" ] ||
[ -z "$ver" ]; then signal_error
"bad PKG-VER: $pv"; fi
56 send_mail
"$a_email" "[GNU ELPA] $pkg version $ver" <<ENDDOC
57 Version $ver of GNU ELPA package $pkg has just been released.
58 You can now find it in M-x package-list RET.
60 More at http://elpa.gnu.org/packages/$pkg.html
67 git pull || signal_error
"git pull failed"
69 # Remember we're inside the "elpa" branch which we don't want to trust,
70 # So always refer to the makefile and admins files from $builddir".
72 # Setup and update externals.
73 emacs
--batch -l "$buildir/admin/archive-contents.el" \
74 -f archive-add
/remove
/update-externals
76 make -f "$buildir/GNUmakefile" check_copyrights ||
77 signal_error
"check_copyright failed"
86 --exclude='*-autoloads.el' \
89 # Refresh the ChangeLog files. This needs to be done in
90 # the source tree, because it needs the VCS data!
91 emacs
-batch -l admin
/archive-contents.el \
92 -eval '(archive-prepare-packages "../elpa")'
95 rm -rf archive
# In case there's one left over!
96 make archive-full ||
{
97 signal_error
"make archive-full failed"
99 latest
="emacs-packages-latest.tgz"
101 GZIP
=--best tar zcf
"$latest" packages
)
103 mkdir
-p staging
/packages
104 # Not sure why we have `staging-old', but let's keep it for now.
106 cp -a staging staging-old
107 # Move new files into place but don't throw out old package versions.
108 for f
in build
/archive
/packages
/*; do
111 dst
="staging/packages/$pv"
112 # Actually, let's never overwrite an existing version. So changes can
113 # be installed without causing a new package to be built until the
114 # version field is changed. Some files need to be excluded from the
115 # "immutable" policy, most importantly "archive-contents"
116 # and "*-readme.txt".
118 */archive-contents |
*-readme.txt
) mv "$f" "$dst" ;;
123 # FIXME: Add a tag to remember the precise code used.
128 mv build
/archive
/"$latest" staging
/
129 rm -rf build
/archive
)
131 # Make the HTML and readme.txt files.
132 (cd ..
/staging
/packages
133 emacs
--batch -l ..
/..
/build
/admin
/archive-contents.el \
134 --eval '(batch-html-make-index)')