Skip to content

Commit

Permalink
Builder: Package filename omits build number for stable builds
Browse files Browse the repository at this point in the history
On Windows, the package filename is defined in the Inno Setup
config file. On Mac, it's defined in platform_release.py. On Ubuntu,
it's set by the debian changelog (call to dch -v).
  • Loading branch information
skyjake committed Mar 15, 2012
1 parent d987eb8 commit c3bfaee
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 4 additions & 1 deletion distrib/builder/changes.py
Expand Up @@ -270,7 +270,10 @@ def generate(self, format):
os.chdir(os.path.join(config.DISTRIB_DIR, 'linux'))

# First we need to update the version.
debVersion = build_version.DOOMSDAY_VERSION_FULL_PLAIN + '-' + Event().tag()
if build_version.DOOMSDAY_RELEASE_TYPE == 'Stable':
debVersion = build_version.DOOMSDAY_VERSION_FULL
else:
debVersion = build_version.DOOMSDAY_VERSION_FULL + '-' + Event().tag()

# Always make one entry.
print 'Marking new version...'
Expand Down
12 changes: 10 additions & 2 deletions distrib/platform_release.py
Expand Up @@ -98,6 +98,13 @@ def mac_os_version():
return platform.mac_ver()[0][:4]


def output_filename(ext=''):
if DOOMSDAY_RELEASE_TYPE == "Stable":
return 'doomsday_' + DOOMSDAY_VERSION_FULL + ext
else:
return 'doomsday_' + DOOMSDAY_VERSION_FULL + "_" + DOOMSDAY_BUILD + ext


def mac_release():
"""The Mac OS X release procedure."""

Expand All @@ -123,7 +130,7 @@ def mac_release():
raise Exception("Failed to build from source.")

# Now we can proceed to packaging.
target = OUTPUT_DIR + "/doomsday_" + DOOMSDAY_VERSION_FULL + "_" + DOOMSDAY_BUILD + ".dmg"
target = os.path.join(OUTPUT_DIR, output_filename('.dmg'))
try:
os.remove(target)
print 'Removed existing target file', target
Expand Down Expand Up @@ -235,7 +242,8 @@ def win_release():
.replace('${YEAR}', time.strftime('%Y'))
.replace('${BUILD}', DOOMSDAY_BUILD)
.replace('${VERSION}', DOOMSDAY_VERSION_FULL)
.replace('${VERSION_PLAIN}', DOOMSDAY_VERSION_FULL_PLAIN))
.replace('${VERSION_PLAIN}', DOOMSDAY_VERSION_FULL_PLAIN)
.replace('${OUTPUT_FILENAME}', output_filename()))

# Execute the win32 release script.
os.chdir('win32')
Expand Down
2 changes: 1 addition & 1 deletion distrib/win32/setup.iss.template
Expand Up @@ -2,7 +2,7 @@
; and any changes will get overwritten when the release script is run.

[Setup]
OutputBaseFilename=doomsday_${VERSION}_${BUILD}
OutputBaseFilename=${OUTPUT_FILENAME}
AppName=Doomsday Engine
AppVerName=Doomsday Engine ${VERSION}
AppPublisher=deng Team
Expand Down

0 comments on commit c3bfaee

Please sign in to comment.