Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding versioning support to DocumentGenerator #63

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

volkan-aslan
Copy link
Contributor

I have added:

--branch : an argparse to get branch/tag name from user which documentation will be created based on it.

VERSION_PATTERN: hard coded pattern for branch/tag inputs coming from users. Only allows RX.X or RX.X.X

is_branch_name_valid(): method to check if --branch(argparse) is matching with VERSION_PATTERN

collect_existing_versions: it checks all the folders in ServicesInterfaceDocumentation repo and create a list if folder name matches with VERSION_PATTERN to find existing versions.

create_root_index: this method will create the index file which holds a dropbox and an iframe to show mkdocs files.

versions: this variable created to check if we are overriding an existing version or creating a new one

sorted_versions: variable to fill dropbox values

Also:
site_name changed from "Documentation" to branch_name to understand which version is currently shown on webpage.

if branch is given as RX.X, script automatically changes . with _ to download correct repository.

Instead of using mkdocs gh-deploy, we now use mkdocs build -d{branch_name} to create files locally in a folder
and then adding, commiting and pushing index.html and the folder that is holding mkdocs files to remote.

@pwielders pwielders removed their request for review December 6, 2023 19:10
@sebaszm sebaszm changed the title Development/document versioning Adding versioning support to DocumentGenerator Dec 14, 2023
@sebaszm sebaszm merged commit 337984d into master Dec 14, 2023
12 of 16 checks passed
@sebaszm sebaszm deleted the development/document_versioning branch December 14, 2023 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants