[devdocsgjs/main: 1634/1867] Adjust `docs:page` version handling
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1634/1867] Adjust `docs:page` version handling
- Date: Fri, 19 Nov 2021 23:48:12 +0000 (UTC)
commit 21827a6b69d0f16ea43a63b59b4226f3d0f82dc3
Author: Richard Michael <rmichael edgeofthenet org>
Date: Fri Apr 30 12:54:40 2021 +0200
Adjust `docs:page` version handling
- Remove `--version` option
- Add `@|~` version notation, consistent with other commands
lib/tasks/docs.thor | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor
index 958da29e..7ac6f1df 100644
--- a/lib/tasks/docs.thor
+++ b/lib/tasks/docs.thor
@@ -40,8 +40,7 @@ class DocsCLI < Thor
TTY::Pager.new.page(output)
end
- desc 'page <doc> [path] [--version] [--verbose] [--debug]', 'Generate a page (no indexing)'
- option :version, type: :string
+ desc 'page (<doc> | <doc@version>) [path] [--verbose] [--debug]', 'Generate a page (no indexing)'
option :verbose, type: :boolean
option :debug, type: :boolean
def page(name, path = '')
@@ -56,7 +55,8 @@ class DocsCLI < Thor
Docs.install_report :filter, :request, :doc
end
- if Docs.generate_page(name, options[:version], path)
+ name, version = name.split(/@|~/)
+ if Docs.generate_page(name, version, path)
puts 'Done'
else
puts "Failed!#{' (try running with --debug for more information)' unless options[:debug]}"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]