From fcaf9879a87cb1ddff2ba17f4fa20804ab53eb79 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Mon, 28 Oct 2013 15:16:01 +0100 Subject: [PATCH] Add docs:clean task for deleting documentation packages --- README.md | 1 + lib/tasks/docs.thor | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 871a585a..eb091728 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ thor docs:manifest # Create the manifest file used by the app thor docs:generate # Generate/scrape a documentation thor docs:page # Generate/scrape a documentation page thor docs:package # Package a documentation for use with docs:download +thor docs:clean # Delete documentation packages # Console thor console # Start a REPL diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor index b68df46e..56200c34 100644 --- a/lib/tasks/docs.thor +++ b/lib/tasks/docs.thor @@ -106,6 +106,12 @@ class DocsCLI < Thor invalid_doc(error.name) end + desc 'clean', 'Delete documentation packages' + def clean + File.delete(*Dir[File.join Docs.store_path, '*.tar.gz']) + puts 'Done' + end + private def find_docs(names)