forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use SVN revision for Chromoting Android APK internal version.
An APK built from a later Chromium branch should have a higher version number than one built from an earlier branch. This CL fixes the Chromoting Android package's internal version to have that property. The scheme implemented here matches official Chrome.apk. Review URL: https://codereview.chromium.org/133123002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244659 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
lambroslambrou@chromium.org
committed
Jan 14, 2014
1 parent
3777e77
commit 91029e6
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2014 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
"""Converts a dotted-quad version string to a single numeric value suitable for | ||
an Android package's internal version number.""" | ||
|
||
import sys | ||
|
||
def main(): | ||
if len(sys.argv) != 2: | ||
print "Usage: %s version-string" % sys.argv[0] | ||
exit(1) | ||
|
||
version_string = sys.argv[1] | ||
version_components = version_string.split('.') | ||
if len(version_components) != 4: | ||
print "Expected 4 components." | ||
exit(1) | ||
|
||
branch = int(version_components[2]) | ||
patch = int(version_components[3]) | ||
print branch * 1000 + patch | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |