Skip to content

Commit

Permalink
Builder: Use the base version for download URIs
Browse files Browse the repository at this point in the history
Omit anything that comes after a dash.
  • Loading branch information
skyjake committed May 15, 2012
1 parent c86b818 commit 84bbd05
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion distrib/builder/event.py
Expand Up @@ -95,6 +95,11 @@ def extract_version_from_filename(self, name):
def tag(self):
return self.name

def version_base(self):
ver = self.version()
if '-' in ver: ver = ver[:ver.find('-')]
return ver

def version(self):
fn = self.file_path('version.txt')
if os.path.exists(fn): return file(fn).read().strip()
Expand Down Expand Up @@ -188,7 +193,7 @@ def download_uri(self, fn):
if self.number() >= 350 and (fn.endswith('.exe') or fn.endswith('.deb') or fn.endswith('.dmg')):
if self.release_type() == 'stable':
return "http://sourceforge.net/projects/deng/files/Doomsday%%20Engine/%s/%s/download" \
% (self.extract_version_from_filename(fn), fn)
% (self.version_base(), fn)
else:
return "http://sourceforge.net/projects/deng/files/Doomsday%%20Engine/Builds/%s/download" % fn
# Default to the old location.
Expand Down

0 comments on commit 84bbd05

Please sign in to comment.