]>
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 version
="$(echo "$file" | sed -e 's|^.*/||' -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\2/')"
54 pkg
="$(echo "$file" | sed -e 's|^.*/||' -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\1/')"
55 send_mail
"$a_email" "[GNU ELPA] $pkg version $version" <<ENDDOC
56 Version $version 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
108 dst
="staging/packages/$(basename "$f")"
109 # Actually, let's never overwrite an existing version. So changes can
110 # be installed without causing a new package to be built until the
111 # version field is changed. Some files need to be excluded from the
112 # "immutable" policy, most importantly "archive-contents"
113 # and "*-readme.txt".
115 */archive-contents |
*-readme.txt
) mv "$f" "$dst" ;;
120 # FIXME: Add a tag to remember the precise code used.
125 mv build
/archive
/"$latest" staging
/
126 rm -rf build
/archive
)
128 # Make the HTML and readme.txt files.
129 (cd ..
/staging
/packages
130 emacs
--batch -l ..
/..
/build
/admin
/archive-contents.el \
131 --eval '(batch-html-make-index)')