import re


def get_ccs_version(ccs_root):
    """Returns the version number of the ccs installation

    Version number is as found in ccs.properties file

    Args:
        ccs_root (str): full path to root of ccs installation
    Returns:
        str: full version/build id as found in ccs.properties file
    Raises:
        OSError: raised if ccs.properties file cannot be found
    """
    version = None
    with open(ccs_root + '/eclipse/ccs.properties') as f:
        lines = f.readlines()
        for line in lines:
            match = re.match("^ccs_buildid=([0-9]+.[0-9]+.[0-9]+.[0-9]+)", line, flags=re.IGNORECASE)
            if match:
                version = match.group(1)
                break
    return version