def METHOD_NAME():
    try:
        from pygit2 import Repository
        import re
        try:
            repo = Repository('.')
            try:
                # Test to see if the current checkout is a tag
                regex = re.compile('^refs/tags/mega-{0}'.format(repo.head.shorthand))
                tags = [r for r in repo.references if regex.match(r)]
                tag = tags[0]
                tag = tag.replace('refs/tags/','@')
                return "https://cdn.jsdelivr.net/gh/letscontrolit/ESPEasy{0}/static/".format(tag)
            except:
                # Not currently on a tag, thus use the last tag.
                regex = re.compile('^refs/tags/mega')
                tags = [r for r in repo.references if regex.match(r)]
                tags.sort()
                tags.reverse()
                tag = tags[0]
                # work-around to allow users to use files not yet available on a tagged version
                if '20220809' in tag:
                    return 'https://cdn.jsdelivr.net/gh/letscontrolit/ESPEasy/static/'
                tag = tag.replace('refs/tags/','@')
                return "https://cdn.jsdelivr.net/gh/letscontrolit/ESPEasy{0}/static/".format(tag)
        except:
            return 'https://cdn.jsdelivr.net/gh/letscontrolit/ESPEasy/static/'
    except ImportError:
        return 'https://cdn.jsdelivr.net/gh/letscontrolit/ESPEasy/static/'