def path(self):
        if self.version.startswith('DEVELOPMENT-SNAPSHOT-'):
            version = self.version[len('DEVELOPMENT-SNAPSHOT-'):]
            (year, month, rest) = version.split('-', 2)
            return os.path.join('versions', 'DEVELOPMENT-SNAPSHOT', year, month, '{}.yaml'.format(rest))

        if '-' in self.version:
            version, rest = self.version.split('-', 1)
        else:
            version = self.version
            rest = None

        major = version.split('.', 1)[0]

        if rest:
            if rest.startswith('DEVELOPMENT-SNAPSHOT-'):
                rest = rest[len('DEVELOPMENT-SNAPSHOT-'):]
                return os.path.join('versions', major, '{}-DEVELOPMENT-SNAPSHOT'.format(version), '{}.yaml'.format(rest))

        return os.path.join('versions', major, '{}.yaml'.format(self.version))