diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-07-24 11:05:15 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-07-24 11:05:15 +0100 |
commit | 0149dc845fd2ef954f487d50b41af1e5dafabd0b (patch) | |
tree | adaa18a8d7cc844cf092532f9ba6fb676c6d1c3d | |
parent | 5ece733f9ca0f0aef6d8b44083ab52347e55c8fa (diff) | |
download | unperish-0149dc845fd2ef954f487d50b41af1e5dafabd0b.tar.gz |
Add publish-docs command.
-rwxr-xr-x | unperish | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -56,6 +56,9 @@ class Unperish(cliapp.Application): 'Debian source package name (typically detected ' 'from debian/control)') self.settings.string(['arch'], 'architecture for Debian packages') + self.settings.string(['web-directory'], + 'put files to go on the web in DIR', + metavar='DIR') def process_args(self, args): self.meta = self.create_meta() @@ -228,6 +231,18 @@ class Unperish(cliapp.Application): out = self.runcmd(['lintian', '-i'] + files, ignore_fail=True, cwd=self.settings['build-area']) self.output.write(out) + + def cmd_publish_docs(self, args): + '''Publish docs related to this project.''' + + docs = ['README', 'NEWS'] + for doc in docs: + if os.path.exists(doc): + target = os.path.join(self.settings['web-directory'], + doc + '.mdwn') + if self.settings['verbose']: + print 'Copying %s to %s' % (doc, target) + shutil.copyfile(doc, target) def cmd_clean(self, args): '''Clean up the build-area (remove everything except the dir).''' |