def get_major_version():
    """    The major version should always reside within the repository and should
    be incremended when major releases are made.
    """
    major_version = 0
    with open('configs/.major_version', 'a+b') as f:
        try:
            major_version = int(f.read())
        except:
            major_version = 0
            f.seek(0)
            f.write(str(major_version))
            f.truncate()
    return major_version
