runway.hooks.staticsite.util module

Utility functions for website build/upload.

runway.hooks.staticsite.util.calculate_hash_of_files(files, root)[source]

Return a hash of all of the given files at the given root.

Adapted from stacker.hooks.aws_lambda; used according to its license: https://github.com/cloudtools/stacker/blob/1.4.0/LICENSE

Parameters
  • files (list[str]) – file names to include in the hash calculation, relative to root.

  • root (str) – base directory to analyze files in.

Returns

A hash of the hashes of the given files.

Return type

str

runway.hooks.staticsite.util.get_hash_of_files(root_path, directories=None)[source]

Generate md5 hash of files.

runway.hooks.staticsite.util.get_ignorer(path, additional_exclusions=None)[source]

Create ignorer with directory gitignore file.