Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Unified Diff: dart/tools/create_windows_installer.py

Issue 104403005: Change SDK/DartEditor versioning scheme to semantic versions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/tools/create_editor.py ('k') | dart/tools/utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/create_windows_installer.py
diff --git a/dart/tools/create_windows_installer.py b/dart/tools/create_windows_installer.py
index 6566a5b7d246f6ed73acfa63659a7ae27d0d87b7..04df5753a8bd48f78a462aaf1ea68101362ce55f 100644
--- a/dart/tools/create_windows_installer.py
+++ b/dart/tools/create_windows_installer.py
@@ -83,24 +83,29 @@ def GetInputDirectory(options, temp_dir):
# In addition to that, the limits on the size are:
# Major: 256
# Minor: 256
-# Build: 65536
+# Patch: 65536
# To circumvent this we create the version like this:
# Major.Minor.X
-# where X is Build<<9 + Patch
-# Example version 1.2.4.14 will go to 1.2.2062
+# from "major.minor.patch-prerelease.prerelease_patch"
+# where X is "patch<<10 + prerelease<<5 + prerelease_patch"
+# Example version 1.2.4-dev.2.3 will go to 1.2.4163
def GetMicrosoftProductVersion(version):
version_parts = version.split('.')
- if len(version_parts) is not 4:
+ if len(version_parts) is not 5:
raise Exception(
"Version string (%s) does not follow specification" % version)
- (major, minor, build, patch) = map(int, version_parts)
+ (major, minor, patch, prerelease, prerelease_patch) = map(int, version_parts)
- if build > 127 or patch > 511:
- raise Exception('Build/Patch can not be above 127/511')
if major > 255 or minor > 255:
raise Exception('Major/Minor can not be above 256')
-
- combined = (build << 9) + patch
+ if patch > 63:
+ raise Exception('Patch can not be above 63')
+ if prerelease > 31:
+ raise Exception('Prerelease can not be above 31')
+ if prerelease_patch > 31:
+ raise Exception('PrereleasePatch can not be above 31')
+
+ combined = (patch << 10) + (prerelease << 5) + prerelease_patch
return '%s.%s.%s' % (major, minor, combined)
# Append using the current indentation level
« no previous file with comments | « dart/tools/create_editor.py ('k') | dart/tools/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698