MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
deploy Namespace Reference

Functions

argparse.Namespace parse_args ()
None remove_path (Path path)
None copy_children (Path source_dir, Path target_dir)
None deploy_root (Path build_dir, Path site_dir)
None deploy_version (Path build_dir, Path site_dir, str version)
list[object] natural_key (str name)
None update_versions (Path site_dir)
subprocess.CompletedProcess[str] git (Path site_dir, *str args, bool check=True)
None commit_and_push (Path site_dir, str label)
None deploy (Path build_dir, Path site_dir, str git_ref, str ref_name)
int main ()

Variables

 VERSION_RE = re.compile(r'v[0-9][A-Za-z0-9.+-]*')

Detailed Description

Deploy generated documentation into the website repository.

Function Documentation

◆ commit_and_push()

None deploy.commit_and_push ( Path site_dir,
str label )
Commit site changes and push with a small rebase retry loop.

Definition at line 102 of file deploy.py.

References git().

Referenced by deploy().

◆ copy_children()

None deploy.copy_children ( Path source_dir,
Path target_dir )
Copy all children from source_dir into target_dir.

Definition at line 36 of file deploy.py.

Referenced by deploy_root(), and deploy_version().

◆ deploy()

None deploy.deploy ( Path build_dir,
Path site_dir,
str git_ref,
str ref_name )
Deploy docs to the correct location based on the ref.

Definition at line 122 of file deploy.py.

References commit_and_push(), deploy_root(), deploy_version(), and update_versions().

◆ deploy_root()

None deploy.deploy_root ( Path build_dir,
Path site_dir )
Deploy docs to the site root while preserving versioned subdirectories.

Definition at line 46 of file deploy.py.

References copy_children(), and remove_path().

Referenced by deploy().

◆ deploy_version()

None deploy.deploy_version ( Path build_dir,
Path site_dir,
str version )
Deploy docs to a versioned subdirectory.

Definition at line 58 of file deploy.py.

References copy_children(), and remove_path().

Referenced by deploy().

◆ git()

subprocess.CompletedProcess[str] deploy.git ( Path site_dir,
*str args,
bool check = True )
Run a git command in the site repository.

Definition at line 91 of file deploy.py.

Referenced by commit_and_push().

◆ main()

int deploy.main ( )
Program entry point.

Definition at line 145 of file deploy.py.

References main(), and parse_args().

Referenced by main().

◆ natural_key()

list[object] deploy.natural_key ( str name)
Split version names into comparable text and numeric chunks.

Definition at line 67 of file deploy.py.

Referenced by update_versions().

◆ parse_args()

argparse.Namespace deploy.parse_args ( )
Parse command line arguments.

Definition at line 17 of file deploy.py.

Referenced by main().

◆ remove_path()

None deploy.remove_path ( Path path)
Remove a file or directory.

Definition at line 28 of file deploy.py.

Referenced by deploy_root(), and deploy_version().

◆ update_versions()

None deploy.update_versions ( Path site_dir)
Update versions.json in the root docs and each versioned snapshot.

Definition at line 72 of file deploy.py.

References natural_key().

Referenced by deploy().

Variable Documentation

◆ VERSION_RE

deploy.VERSION_RE = re.compile(r'v[0-9][A-Za-z0-9.+-]*')

Definition at line 14 of file deploy.py.