Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions lfric_macros/check_macro_chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,26 @@ def compare_tags(before, after, path, errors):
) + "\n".join(x for x in single_tags)


def check_fcm():
"""
Check if this script is being run for a fcm working copy and fail gracefully
if so.
"""
dependency = os.path.join(os.environ["SOURCE_ROOT"], "apps", "dependencies.sh")

if os.path.exists(dependency):
raise Exception(
"[ERROR] check_macro_chains.py no longer works with FCM sources. "
"Please ignore this error until you have migrated your work "
"to GitHub. Thank you"
)


def main():
"""
Main function of the program
"""
check_fcm()

source_apps = os.path.join(os.environ["SOURCE_ROOT"], "lfric_apps")
source_core = os.path.join(os.environ["SOURCE_ROOT"], "lfric_core")
Expand Down