From a6de62b3a17e1ddda8d1e6ec3f133217009ebd8c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 14 Oct 2010 17:21:13 -0400 Subject: [PATCH] Do ${version} substitution. --- freshmeat-submit | 4 +++- freshmeat-submit.xml | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/freshmeat-submit b/freshmeat-submit index a802463..b77b8f7 100755 --- a/freshmeat-submit +++ b/freshmeat-submit @@ -152,11 +152,13 @@ class FreshmeatMetadataFactory: for file in args: if file.endswith(".rpm"): crack_rpm(file, data, urls) - # Second. stuff from stdin if present + # Second, stuff from stdin if present if options.read: message = self.message_parser.parse(stream) for (key, value) in message.items(): if key.endswith("-URL"): + for (k, v) in data.items(): + value = value.replace('${' + k + '}', v) urls.update({key[:-4] : value}) else: data.update({self.header_to_field(key) : value}) diff --git a/freshmeat-submit.xml b/freshmeat-submit.xml index 5cb341c..34d2883 100644 --- a/freshmeat-submit.xml +++ b/freshmeat-submit.xml @@ -63,9 +63,7 @@ standard input. -N -Display the merged record from binary package arguments, -standard input and command-line options to standard output. Don't -ship it. +Dump the generated JSON, but don't ship it. to Freshmeat. @@ -91,7 +89,9 @@ is mined out of the RPM and merged into the release information. An RFC-2822-format message, strongly resembling an ordinary email message, on standard input. The message header fields each specify a particular item of release information; the body (if -present) becomes the change announcement text. +present) becomes the change announcement text. Within URL fields, the +string ${version} will be replaced with the contends of the Version +field. @@ -226,7 +226,7 @@ Version: 1.1 Release-Focus: Major feature enhancements Hide: N Website-URL: http://www.catb.org/~esr/doclifter/ -Tar/GZ-URL: http://www.catb.org/~esr/doclifter/doclifter-1.1.tar.gz +Tar/GZ-URL: http://www.catb.org/~esr/doclifter/doclifter-${version}.tar.gz Fixed a bug in conditional evaluation that twadmin(8) tickled. Better detection of pure inclusions. Better blank-section elimination. -- 2.43.0