mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
provision: Put hash_name argument first (minor).
This commit is contained in:
@@ -379,8 +379,8 @@ def os_families() -> Set[str]:
|
|||||||
distro_info = parse_os_release()
|
distro_info = parse_os_release()
|
||||||
return {distro_info["ID"], *distro_info.get("ID_LIKE", "").split()}
|
return {distro_info["ID"], *distro_info.get("ID_LIKE", "").split()}
|
||||||
|
|
||||||
def file_or_package_hash_updated(paths: List[str],
|
def file_or_package_hash_updated(hash_name: str,
|
||||||
hash_name: str,
|
paths: List[str],
|
||||||
package_versions: List[str]=[]) -> bool:
|
package_versions: List[str]=[]) -> bool:
|
||||||
# Check whether the files or package_versions passed as arguments
|
# Check whether the files or package_versions passed as arguments
|
||||||
# changed compared to the last execution.
|
# changed compared to the last execution.
|
||||||
|
|||||||
@@ -121,8 +121,8 @@ def need_to_run_build_pygments_data() -> bool:
|
|||||||
from pygments import __version__ as pygments_version
|
from pygments import __version__ as pygments_version
|
||||||
|
|
||||||
return file_or_package_hash_updated(
|
return file_or_package_hash_updated(
|
||||||
build_pygments_data_paths(),
|
|
||||||
"build_pygments_data_hash",
|
"build_pygments_data_hash",
|
||||||
|
build_pygments_data_paths(),
|
||||||
[pygments_version]
|
[pygments_version]
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -133,8 +133,8 @@ def need_to_run_compilemessages() -> bool:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
return file_or_package_hash_updated(
|
return file_or_package_hash_updated(
|
||||||
|
"last_compilemessages_hash",
|
||||||
compilemessages_paths(),
|
compilemessages_paths(),
|
||||||
"last_compilemessages_hash"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def need_to_run_inline_email_css() -> bool:
|
def need_to_run_inline_email_css() -> bool:
|
||||||
@@ -142,8 +142,8 @@ def need_to_run_inline_email_css() -> bool:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
return file_or_package_hash_updated(
|
return file_or_package_hash_updated(
|
||||||
|
"last_email_source_files_hash",
|
||||||
inline_email_css_paths(),
|
inline_email_css_paths(),
|
||||||
"last_email_source_files_hash"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def main(options: argparse.Namespace) -> int:
|
def main(options: argparse.Namespace) -> int:
|
||||||
|
|||||||
@@ -153,8 +153,8 @@ class Database:
|
|||||||
# migrations without spending a few 100ms parsing all the
|
# migrations without spending a few 100ms parsing all the
|
||||||
# Python migration code.
|
# Python migration code.
|
||||||
check_migrations = file_or_package_hash_updated(
|
check_migrations = file_or_package_hash_updated(
|
||||||
migration_paths(),
|
|
||||||
"migrations_hash_" + database_name
|
"migrations_hash_" + database_name
|
||||||
|
migration_paths(),
|
||||||
)
|
)
|
||||||
if not check_migrations:
|
if not check_migrations:
|
||||||
return 'current'
|
return 'current'
|
||||||
|
|||||||
Reference in New Issue
Block a user