Skip to content

Commit

Permalink
Builder|Fixed: Version number parsing and stable download URI
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 15, 2012
1 parent 977d404 commit c86b818
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions distrib/builder/event.py
Expand Up @@ -90,7 +90,7 @@ def extract_version_from_filename(self, name):
return name[pos+1:us]
elif dash > 0 and us > 0:
return name[pos+1:min(dash, us)]
return name[pos+1:name.find('.', pos)]
return name[pos+1:name.rfind('.', pos)]

def tag(self):
return self.name
Expand Down Expand Up @@ -186,7 +186,11 @@ def compress_logs(self):
def download_uri(self, fn):
# Available on SourceForge?
if self.number() >= 350 and (fn.endswith('.exe') or fn.endswith('.deb') or fn.endswith('.dmg')):
return "http://sourceforge.net/projects/deng/files/Doomsday%%20Engine/Builds/%s/download" % fn
if self.release_type() == 'stable':
return "http://sourceforge.net/projects/deng/files/Doomsday%%20Engine/%s/%s/download" \
% (self.extract_version_from_filename(fn), fn)
else:
return "http://sourceforge.net/projects/deng/files/Doomsday%%20Engine/Builds/%s/download" % fn
# Default to the old location.
return "%s/%s/%s" % (config.BUILD_URI, self.name, fn)

Expand Down

0 comments on commit c86b818

Please sign in to comment.