This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docfile that contatins configuration for devdocs content management Implement rake automation to use the Docfile locally and on CICD
- Loading branch information
Showing
4 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The "guides/v2.0" directory contains all content from the "2.0" branch of the "magento/devdocs" repository. | ||
The "guides/m1x" directory contains all content from the "master" branch of the "magento/devdocs-m1" repository. | ||
The "mbi" directory contains only "docs" content from the "master" branch of the "magento/devdocs-mbi" repository. | ||
The "page-builder" directory contains only "docs" content from the "develop" branch of the "magento-devdocs/magento2-page-builder" repository. | ||
The "mftf" directory contains only "docs" content from the "develop" branch of the "magento/magento2-functional-testing-framework" repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Read Docfile file and get configuration data for adding subrepositories | ||
class DocConfig | ||
attr_reader :config | ||
def initialize(config_file = 'Docfile') | ||
@config_data = File.readlines(config_file) | ||
@config = [] | ||
parse_file | ||
end | ||
|
||
def parse_file | ||
@config = | ||
@config_data.map do |string| | ||
{ | ||
'directory' => string[/(?<=")[^"]+(?="\sdirectory)/], | ||
'repository' => string[/(?<=")[^"]+(?="\srepository)/], | ||
'branch' => string[/(?<=")[^"]+(?="\sbranch)/], | ||
'filter' => string.match?(/(?<=")[^"]+(?="\scontent)/) | ||
} | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters