# Path: lain_cli/utils.py
# def lain_yaml(ignore_prepare=False):
#     if not os.path.exists(LAIN_YAML_PATH):
#         error('Missing lain.yaml under current directory')
#         sys.exit(1)
#     return LainYaml(LAIN_YAML_PATH, ignore_prepare=ignore_prepare)


from lain_sdk.util import error, info
from lain_cli.utils import lain_yaml
# -*- coding: utf-8 -*-


def meta():
    """
    Show current meta version
    """

    meta_version = lain_yaml(ignore_prepare=True).repo_meta_version()
    if meta_version is None:
        error("please git commit.")
    else:

# Path: lain_cli/utils.py
# def lain_yaml(ignore_prepare=False):
#     if not os.path.exists(LAIN_YAML_PATH):
#         error('Missing lain.yaml under current directory')
#         sys.exit(1)
#     return LainYaml(LAIN_YAML_PATH, ignore_prepare=ignore_prepare)


# Path: lain_cli/meta.py
from lain_sdk.util import error, info
from lain_cli.utils import lain_yaml

# -*- coding: utf-8 -*-


def meta():
    """
    Show current meta version
    """

    meta_version = lain_yaml(ignore_prepare=True).repo_meta_version()
    if meta_version is None:
        error("please git commit.")
    else:

        info("meta version : %s" % lain_yaml(ignore_prepare=True).repo_meta_version())