]>
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"
25 From: ELPA update <do.not.reply@elpa.gnu.org>
30 cat -) |
/usr
/sbin
/sendmail
"$to"
33 # Send an email to warn about a problem.
36 if [ "" = "$makelog" ]; then
39 send_mail
"emacs-elpa-diffs@gnu.org" "$title" <"$makelog"
45 if [ "yes" != "$announce" ]; then return; fi
47 pkg
="$(echo "$pv" | sed -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\1/')"
48 ver
="$(echo "$pv" | sed -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\2/')"
49 if [ -z "$pkg" ] ||
[ -z "$ver" ]; then signal_error
"bad PKG-VER: $pv"; fi
50 send_mail
"$a_email" "[GNU ELPA] $pkg version $ver" <<ENDDOC
51 Version $ver of GNU ELPA package $pkg has just been released.
52 You can now find it in M-x package-list RET.
54 More at http://elpa.gnu.org/packages/$pkg.html
61 git pull || signal_error
"git pull failed"
63 # Remember we're inside the "elpa" branch which we don't want to trust,
64 # So always refer to the makefile and admins files from $builddir".
66 # Setup and update externals.
67 emacs
--batch -l "$buildir/admin/archive-contents.el" \
68 -f archive-add
/remove
/update-externals
70 make -f "$buildir/GNUmakefile" check_copyrights ||
71 signal_error
"check_copyright failed"
80 --exclude='*-autoloads.el' \
83 # Refresh the ChangeLog files. This needs to be done in
84 # the source tree, because it needs the VCS data!
85 emacs
-batch -l admin
/archive-contents.el \
86 -eval '(archive-prepare-packages "../elpa")'
89 rm -rf archive
# In case there's one left over!
90 make archive-full ||
{
91 signal_error
"make archive-full failed"
93 latest
="emacs-packages-latest.tgz"
95 GZIP
=--best tar zcf
"$latest" packages
)
97 mkdir
-p staging
/packages
98 # Not sure why we have `staging-old', but let's keep it for now.
100 rsync
-av --inplace --delete staging
/. staging-old
/.
101 # Move new files into place but don't throw out old package versions.
102 for f
in $buildir/archive
/packages
/*; do
105 dst
="staging/packages/$pv"
106 # Actually, let's never overwrite an existing version. So changes can
107 # be installed without causing a new package to be built until the
108 # version field is changed. Some files need to be excluded from the
109 # "immutable" policy, most importantly "archive-contents"
110 # and "*-readme.txt".
112 */archive-contents |
*-readme.txt
) mv "$f" "$dst" ;;
117 # FIXME: Add a tag to remember the precise code used.
122 mv $buildir/archive
/"$latest" staging
/
123 rm -rf $buildid/archive
)
125 # Make the HTML and readme.txt files.
126 (cd ..
/staging
/packages
127 emacs
--batch -l $buildir/admin
/archive-contents.el \
128 --eval '(batch-html-make-index)')