Unfortunately, the inaugural run of this function gave bad results:
<http://lists.gnu.org/archive/html/info-gnu-emacs/2014-05/msg00001.html>.
* admin/update-archive.sh (announce_new): Take PKG-VER as $1;
rename local var ‘file’ to ‘pv’, ‘version’ to ‘ver’; rewrite sed
script; combine into one; use ‘eval’; add sanity check.
<staging>: Extract PKG-VER into var ‘pv’; use it for ‘dst’;
pass it to ‘announce_new’ instead of ‘f’.
announce_new () {
if [ "yes" != "$announce" ]; then return; fi
announce_new () {
if [ "yes" != "$announce" ]; then return; fi
- file="$1"
- version="$(echo "$file" | sed -e 's|^.*/||' -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\2/')"
- pkg="$(echo "$file" | sed -e 's|^.*/||' -e 's/^\(.*\)-\([^-]*\)\.[^-.]*$/\1/')"
- send_mail "$a_email" "[GNU ELPA] $pkg version $version" <<ENDDOC
-Version $version of GNU ELPA package $pkg has just been released.
+ pv="$1"
+ eval $(echo "$pv" | sed -e 's/^\(.*\)-\([^-]*\)$/pkg="\1" ver="\2"/')
+ test "$pkg" && test "$ver" || signal_error "bad PKG-VER: $pv"
+ send_mail "$a_email" "[GNU ELPA] $pkg version $ver" <<ENDDOC
+Version $ver of GNU ELPA package $pkg has just been released.
You can now find it in M-x package-list RET.
More at http://elpa.gnu.org/packages/$pkg.html
You can now find it in M-x package-list RET.
More at http://elpa.gnu.org/packages/$pkg.html
cp -a staging staging-old
# Move new files into place but don't throw out old package versions.
for f in build/archive/packages/*; do
cp -a staging staging-old
# Move new files into place but don't throw out old package versions.
for f in build/archive/packages/*; do
- dst="staging/packages/$(basename "$f")"
+ # PKG-VER
+ pv=$(basename "$f")
+ dst="staging/packages/$pv"
# Actually, let's never overwrite an existing version. So changes can
# be installed without causing a new package to be built until the
# version field is changed. Some files need to be excluded from the
# Actually, let's never overwrite an existing version. So changes can
# be installed without causing a new package to be built until the
# version field is changed. Some files need to be excluded from the
else
mv "$f" "$dst"
# FIXME: Add a tag to remember the precise code used.
else
mv "$f" "$dst"
# FIXME: Add a tag to remember the precise code used.