Skip to content

Commit

Permalink
Drop unused code
Browse files Browse the repository at this point in the history
It was anyway not a good idea to make revision handling
special just for one build format and to depend different
only when using osc.
  • Loading branch information
adrianschroeter committed Jul 16, 2024
1 parent 5a4de99 commit f9cc89b
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions set_version
Original file line number Diff line number Diff line change
Expand Up @@ -222,22 +222,6 @@ class VersionDetector(object):
return None


class RevisionDetector(object):

def __init__(self):
pass

def autodetect(self):
return self._get_revision_from_osc_files()

@staticmethod
def _get_revision_from_osc_files():
from xml.etree import ElementTree
_filesname = os.path.join('.osc', '_files')
_filesXML = ElementTree.parse(_filesname)
return _filesXML.getroot().attrib['rev']


class PackageTypeDetector(object):
# pylint: disable=too-few-public-methods
@staticmethod
Expand Down Expand Up @@ -423,9 +407,6 @@ if __name__ == '__main__':
parser.add_argument('--version',
help='use given version string, do not detect it '
'from source files')
parser.add_argument('--revision',
help='use given revision string, do not detect it '
'from obs files')
parser.add_argument('--basename', default="",
help='detect version based on the file name with '
'a given prefix')
Expand All @@ -442,7 +423,6 @@ if __name__ == '__main__':
args = vars(parser.parse_args())

version = args['version']
revision = args['revision']

outdir = args['outdir']

Expand Down

0 comments on commit f9cc89b

Please sign in to comment.