From 545b1514df34ddc6dbf6998ed523b87ff1a49b81 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 4 May 2012 23:47:39 +0000 Subject: ctanupload (4may12) git-svn-id: svn://tug.org/texlive/trunk@26193 c570f23f-e606-0410-a88d-b1316a301751 --- .../linked_scripts/ctanupload/ctanupload.pl | 16 +++++++++------- .../doc/support/ctanupload/Makefile.example | 10 ++++++---- .../doc/support/ctanupload/ctanupload.pdf | Bin 144935 -> 170676 bytes .../doc/support/ctanupload/ctanupload.tex | 8 ++++---- Master/texmf-dist/scripts/ctanupload/ctanupload.pl | 16 +++++++++------- 5 files changed, 28 insertions(+), 22 deletions(-) diff --git a/Build/source/texk/texlive/linked_scripts/ctanupload/ctanupload.pl b/Build/source/texk/texlive/linked_scripts/ctanupload/ctanupload.pl index a365e7fd47a..716bc24b2aa 100644 --- a/Build/source/texk/texlive/linked_scripts/ctanupload/ctanupload.pl +++ b/Build/source/texk/texlive/linked_scripts/ctanupload/ctanupload.pl @@ -10,7 +10,7 @@ sub fromenv; sub load_data; sub save_data; -my $VERSION = 'v1.2 from 2011/09/08'; +my $VERSION = 'v1.2a from 2012/05/03'; my %CTAN_SERVERURLS = ( dante => 'http://dante.ctan.org/upload.html', uktug => 'http://www.tex.ac.uk/upload/', @@ -232,6 +232,9 @@ while (my $arg = shift @ARGV) { } } +$CTAN_URL = (values %CTAN_SERVERURLS)[int rand scalar values %CTAN_SERVERURLS] + if not defined $CTAN_URL; + PROMPT: if ($PROMPT) { @@ -340,8 +343,8 @@ if ($FIELDS{DoNotAnnounce}) { $DoNotAnnounce = '[x]'; } else { - $FIELDS{DoNotAnnounce} = undef; - $FIELDS{to_announce} = undef; + delete $FIELDS{DoNotAnnounce}; + delete $FIELDS{to_announce}; $DoNotAnnounce = '[ ]'; } @@ -350,9 +353,6 @@ if (!$FIELDS{directory}) { } -$CTAN_URL = (values %CTAN_SERVERURLS)[int rand scalar values %CTAN_SERVERURLS] - if not defined $CTAN_URL; - print "\nThe following data will be submitted to CTAN ($CTAN_URL):\n"; foreach my $field (@FIELDS) { @@ -427,12 +427,14 @@ $mech->submit_form( ); if ($mech->success()) { - print "Upload failed: ", $mech->response()->message(), "\n"; + print "HTTP response code: ", $mech->response()->message(), "\n"; } print "\nResponse:\n"; print LOG "\n# Response:\n" if $LOG; eval { + #print $mech->content(); + #return 1; use HTML::TreeBuilder; use HTML::FormatText; my $tree = HTML::TreeBuilder->new_from_content( $mech->content() ); diff --git a/Master/texmf-dist/doc/support/ctanupload/Makefile.example b/Master/texmf-dist/doc/support/ctanupload/Makefile.example index ec35030541e..2fef9e16224 100644 --- a/Master/texmf-dist/doc/support/ctanupload/Makefile.example +++ b/Master/texmf-dist/doc/support/ctanupload/Makefile.example @@ -1,5 +1,5 @@ -# Example Makefile which uses ctanify and ctanupload to pack and upload a LaTeX package -# The required data is passed using environment variables. +# Example Makefile which uses ctanify and ctanupload to pack and upload a +# LaTeX package. The required data is passed using environment variables. CONTRIBUTION = foobar NAME = John Doe EMAIL = john.doe@inter.net @@ -7,7 +7,8 @@ DIRECTORY = /macros/latex/contrib/${CONTRIBUTION} LICENSE = free FREEVERSION = lppl FILE = ${CONTRIBUTION}.tar.gz -export CONTRIBUTION VERSION NAME EMAIL SUMMARY DIRECTORY DONOTANNOUNCE ANNOUNCE NOTES LICENSE FREEVERSION FILE +export CONTRIBUTION VERSION NAME EMAIL SUMMARY DIRECTORY DONOTANNOUNCE \ + ANNOUNCE NOTES LICENSE FREEVERSION FILE ctanify: ${FILE} @@ -17,7 +18,8 @@ ${CONTRIBUTION}.sty: ${CONTRIBUTION}.ins ${CONTRIBUTION}.dtx ${CONTRIBUTION}.pdf: ${CONTRIBUTION}.dtx ${CONTRIBUTION}.sty latexmk $< -${FILE}: ${CONTRIBUTION}.dtx ${CONTRIBUTION}.ins ${CONTRIBUTION}.sty README ${CONTRIBUTION}.pdf +${FILE}: ${CONTRIBUTION}.dtx ${CONTRIBUTION}.ins ${CONTRIBUTION}.sty \ + README ${CONTRIBUTION}.pdf ctanify $^ upload: ctanify diff --git a/Master/texmf-dist/doc/support/ctanupload/ctanupload.pdf b/Master/texmf-dist/doc/support/ctanupload/ctanupload.pdf index 2c98b3715e6..b263b9c9000 100644 Binary files a/Master/texmf-dist/doc/support/ctanupload/ctanupload.pdf and b/Master/texmf-dist/doc/support/ctanupload/ctanupload.pdf differ diff --git a/Master/texmf-dist/doc/support/ctanupload/ctanupload.tex b/Master/texmf-dist/doc/support/ctanupload/ctanupload.tex index 5b41e9f51c4..1f5305b7155 100644 --- a/Master/texmf-dist/doc/support/ctanupload/ctanupload.tex +++ b/Master/texmf-dist/doc/support/ctanupload/ctanupload.tex @@ -3,7 +3,7 @@ \title{The \textsf{ctanupload} script} \author{Martin Scharrer} \email{martin@scharrer.me} -\date{Version v1.2 -- 2011/09/08} +\date{Version v1.2a -- 2012/05/03} \providecommand\envvar{\texttt} @@ -79,7 +79,7 @@ The following fields exists in the CTAN upload form. At least the ones marked as \par\medskip\par\noindent \begin{tabular}{>{\ttfamily}llc} \toprule - \normalfont Field & Description & Mandatory \\ +\normalfont Field & Description & ~~~~~\llap{Mandatory} \\ \midrule contribution & Name of your contribution & * \\ version & Version number & *\\ @@ -89,7 +89,7 @@ The following fields exists in the CTAN upload form. At least the ones marked as directory & Suggested CTAN directory\\ DoNotAnnounce & No need to announce this update\\ announce & Short description for announcement\\ - notes & Optional notes to the CTAN maintainers (DANTE server only)\\ + notes & Optional notes to the CTAN maintainers (DANTE only)\\ license & License type (see below) & *\\ freeversion & Which free license (see below)\\ file & File to upload & *\\ @@ -209,6 +209,6 @@ ctanupload --announce-file announcement.txt -p The following Makefile (see \url{http://www.gnu.org/software/make/manual/make.html}) uses the \texttt{ctanify} script (\url{http://www.ctan.org/pkg/ctanify}) to create a compressed file for submission using \texttt{ctanupload}. -\lstinputlisting{Makefile.example} +\lstinputlisting[basicstyle=\ttfamily\scriptsize,frame=lrbt]{Makefile.example} \end{document} diff --git a/Master/texmf-dist/scripts/ctanupload/ctanupload.pl b/Master/texmf-dist/scripts/ctanupload/ctanupload.pl index a365e7fd47a..716bc24b2aa 100755 --- a/Master/texmf-dist/scripts/ctanupload/ctanupload.pl +++ b/Master/texmf-dist/scripts/ctanupload/ctanupload.pl @@ -10,7 +10,7 @@ sub fromenv; sub load_data; sub save_data; -my $VERSION = 'v1.2 from 2011/09/08'; +my $VERSION = 'v1.2a from 2012/05/03'; my %CTAN_SERVERURLS = ( dante => 'http://dante.ctan.org/upload.html', uktug => 'http://www.tex.ac.uk/upload/', @@ -232,6 +232,9 @@ while (my $arg = shift @ARGV) { } } +$CTAN_URL = (values %CTAN_SERVERURLS)[int rand scalar values %CTAN_SERVERURLS] + if not defined $CTAN_URL; + PROMPT: if ($PROMPT) { @@ -340,8 +343,8 @@ if ($FIELDS{DoNotAnnounce}) { $DoNotAnnounce = '[x]'; } else { - $FIELDS{DoNotAnnounce} = undef; - $FIELDS{to_announce} = undef; + delete $FIELDS{DoNotAnnounce}; + delete $FIELDS{to_announce}; $DoNotAnnounce = '[ ]'; } @@ -350,9 +353,6 @@ if (!$FIELDS{directory}) { } -$CTAN_URL = (values %CTAN_SERVERURLS)[int rand scalar values %CTAN_SERVERURLS] - if not defined $CTAN_URL; - print "\nThe following data will be submitted to CTAN ($CTAN_URL):\n"; foreach my $field (@FIELDS) { @@ -427,12 +427,14 @@ $mech->submit_form( ); if ($mech->success()) { - print "Upload failed: ", $mech->response()->message(), "\n"; + print "HTTP response code: ", $mech->response()->message(), "\n"; } print "\nResponse:\n"; print LOG "\n# Response:\n" if $LOG; eval { + #print $mech->content(); + #return 1; use HTML::TreeBuilder; use HTML::FormatText; my $tree = HTML::TreeBuilder->new_from_content( $mech->content() ); -- cgit v1.2.3