Merge lp:~mikemc/ubuntuone-windows-installer/fix-1037313-add-revnos into lp:ubuntuone-windows-installer

Proposed by Mike McCracken
Status: Merged
Approved by: dobey
Approved revision: 141
Merged at revision: 133
Proposed branch: lp:~mikemc/ubuntuone-windows-installer/fix-1037313-add-revnos
Merge into: lp:ubuntuone-windows-installer
Diff against target: 61 lines (+20/-6)
2 files modified
scripts/data/macapp_template.plist (+5/-1)
scripts/setup-mac.py (+15/-5)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-windows-installer/fix-1037313-add-revnos
Reviewer Review Type Date Requested Status
dobey (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+119799@code.launchpad.net

Commit message

- Add revno information to Finder-visible short version string. (LP: #1037313)

Description of the change

- Add revno information to Finder-visible short version string. (LP: #1037313)

To post a comment you must log in.
140. By Mike McCracken

Get revnos each time in do_setup so that this still works when calling prepare for the first time.

Revision history for this message
Roberto Alsina (ralsina) :
review: Approve
141. By Mike McCracken

merge with trunk

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/data/macapp_template.plist'
2--- scripts/data/macapp_template.plist 2012-06-05 19:59:55 +0000
3+++ scripts/data/macapp_template.plist 2012-08-17 18:18:19 +0000
4@@ -8,5 +8,9 @@
5 <string>ubuntuone.icns</string>
6 <key>CFBundleDevelopmentRegion</key>
7 <string>English</string>
8+ <key>CFBundleShortVersionString</key>
9+ <string>3.0.0</string>
10+ <key>CFBundleVersion</key>
11+ <string>3.0.0.1</string>
12 </dict>
13-</plist>
14\ No newline at end of file
15+</plist>
16
17=== modified file 'scripts/setup-mac.py'
18--- scripts/setup-mac.py 2012-08-02 17:30:48 +0000
19+++ scripts/setup-mac.py 2012-08-17 18:18:19 +0000
20@@ -389,12 +389,13 @@
21 os.chdir(start_dir)
22
23 # Create revno file
24+ revno_str = ("ubuntu-sso-client: %s, "
25+ "ubuntuone-client: %s, "
26+ "ubuntuone-control-panel: %s, "
27+ "ubuntuone-storage-protocol: %s" %
28+ (sso_revno, u1client_revno, u1cp_revno, sp_revno))
29 with open(os.path.join("data", "revnos.txt"), "w+") as revnos:
30- revnos.write("ubuntu-sso-client: %s"
31- "ubuntuone-client: %s"
32- "ubuntuone-control-panel: %s"
33- "ubuntuone-storage-protocol: %s" %
34- (sso_revno, u1client_revno, u1cp_revno, sp_revno))
35+ revnos.write(revno_str)
36
37 # Copy storage-protocol's pem files
38 shutil.copyfile(os.path.join(self.source_dir,
39@@ -465,6 +466,7 @@
40 data_files = glob.glob("data/*")
41
42 master_plist = Plist.fromFile('data/macapp_template.plist')
43+
44 master_options = {"includes": ['google.protobuf.descriptor',
45 'sip',
46 'twisted.web.resource',
47@@ -508,6 +510,14 @@
48
49 print "calling setup for:", name
50 plist = copy.deepcopy(master_plist)
51+
52+ if os.path.exists('data/revnos.txt'):
53+ revno_str = open('data/revnos.txt', 'r').read()
54+ ver_string = "%s (%s)" % (
55+ master_plist["CFBundleShortVersionString"],
56+ revno_str)
57+ plist.update(CFBundleShortVersionString=ver_string)
58+
59 plist.update(LSUIElement=is_background,
60 CFBundleIdentifier=id,
61 CFBundleExecutable=exename,

Subscribers

People subscribed via source and target branches