[devdocsgjs/main: 1633/1867] Adjust `docs:generate` version handling
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1633/1867] Adjust `docs:generate` version handling
- Date: Fri, 19 Nov 2021 23:48:12 +0000 (UTC)
commit 26a1e61a421f037ff5376c1164e87908eda77a59
Author: Richard Michael <rmichael edgeofthenet org>
Date: Fri Apr 30 12:53:36 2021 +0200
Adjust `docs:generate` version handling
- Remove `--version` option
- Add `@|~` version notation, consistent with `docs:download`
- Adjust `CONTRIBUTING.md` instructions
.github/CONTRIBUTING.md | 4 ++--
lib/tasks/docs.thor | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index a756fd00..26444a3c 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -68,9 +68,9 @@ Follow the following steps to update documentations to their latest version:
2. Check if the license is still correct. If you update `options[:attribution]`, also update the
documentation's entry in the array in
[`assets/javascripts/templates/pages/about_tmpl.coffee`](../assets/javascripts/templates/pages/about_tmpl.coffee)
to match.
3. If the documentation has a custom icon, ensure the icons in
<code>public/icons/*your_scraper_name*/</code> are up-to-date. If you pull the updated icon from a place
different than the one specified in the `SOURCE` file, make sure to replace the old link with the new one.
4. If `self.links` is defined, check if the urls are still correct.
-5. Generate the docs using `thor docs:generate <doc>`.
+5. Generate the docs using `thor docs:generate <doc@version>`.
6. Make sure `thor docs:generate` doesn't show errors and that the documentation still works well. Verify
locally that everything works and that the categorization of entries is still good. Often, updates will
require code changes in the scraper or its filters to tweak some new markup in the source website or to
categorize new entries.
-7. Repeat steps 5 and 6 for all versions that you updated. `thor docs:generate` accepts a `--version`
argument to specify which version to scrape.
+7. Repeat steps 5 and 6 for all versions that you updated.
8. Create a PR and make sure to fill the checklist in section B of the PR template (remove the other
sections).
## Coding conventions
diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor
index 786d9ef6..958da29e 100644
--- a/lib/tasks/docs.thor
+++ b/lib/tasks/docs.thor
@@ -65,8 +65,7 @@ class DocsCLI < Thor
handle_doc_not_found_error(error)
end
- desc 'generate <doc> [--version] [--verbose] [--debug] [--force] [--package]', 'Generate a documentation'
- option :version, type: :string
+ desc 'generate (<doc> | <doc@version>) [--verbose] [--debug] [--force] [--package]', 'Generate a
documentation'
option :all, type: :boolean
option :verbose, type: :boolean
option :debug, type: :boolean
@@ -80,7 +79,7 @@ class DocsCLI < Thor
require 'unix_utils' if options[:package]
- doc = Docs.find(name, options[:version])
+ doc = find_doc(name)
if doc < Docs::UrlScraper && !options[:force]
puts <<-TEXT.strip_heredoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]