Skip to content

Commit

Permalink
Merge pull request #29 from pixel-point/promakh
Browse files Browse the repository at this point in the history
Increment build version. Add build to the version label in prefs.
  • Loading branch information
lnikell authored Oct 8, 2018
2 parents 48f51bd + f2205fc commit 4f2b8e3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Mute Me Now/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@
</constraints>
</customView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fwG-yv-1ky">
<rect key="frame" x="222" y="319" width="97" height="17"/>
<rect key="frame" x="200" y="319" width="140" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Version: 1.0" id="aLh-Ga-uOd">
<font key="font" metaFont="system"/>
Expand Down
6 changes: 3 additions & 3 deletions Mute Me Now/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>LSBackgroundOnly</key>
<true/>
<key>LSMinimumSystemVersion</key>
Expand All @@ -32,7 +34,5 @@
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
</dict>
</plist>
4 changes: 3 additions & 1 deletion Mute Me Now/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ - (void)viewDidLoad {

// set version from plist to label
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
NSString *versionFieldValue = [NSString stringWithFormat:@"Version %@", version];
NSString *buildVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
NSString *buildLabel = [buildVersion isEqualToString:@"1"] ? @"" :[NSString stringWithFormat:@"(%@)", buildVersion];
NSString *versionFieldValue = [NSString stringWithFormat:@"Version %@%@", version, buildLabel];
[self.versionTextFieldCell setStringValue:versionFieldValue];
}

Expand Down

0 comments on commit 4f2b8e3

Please sign in to comment.