Skip to content

Commit

Permalink
Use Alcatraz-Info.plist as the single source of thruth for bundle ver…
Browse files Browse the repository at this point in the history
…sion

Removed ATZVersion.h
  • Loading branch information
guillaumealgis committed Sep 28, 2015
1 parent 3902c70 commit 6ae6806
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 38 deletions.
2 changes: 0 additions & 2 deletions Alcatraz.xcodeproj/project.pbxproj
Expand Up @@ -66,7 +66,6 @@
0C7AF64F186B4E890064EE7B /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
32BDEBC2173A46A900513A7C /* eye_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = eye_icon.png; sourceTree = "<group>"; };
32D86503173A4555009C724B /* eye_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "eye_icon@2x.png"; sourceTree = "<group>"; };
6449530218CE826C009494BD /* ATZVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ATZVersion.h; sourceTree = "<group>"; };
64EDC500188CB55A00D45F1D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
890A4B3F171F031300AFE577 /* Alcatraz.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Alcatraz.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; };
890A4B42171F031300AFE577 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -220,7 +219,6 @@
890A4B4C171F031300AFE577 /* Alcatraz.h */,
890A4B4D171F031300AFE577 /* Alcatraz.m */,
890A4B47171F031300AFE577 /* Supporting Files */,
6449530218CE826C009494BD /* ATZVersion.h */,
);
path = Alcatraz;
sourceTree = "<group>";
Expand Down
30 changes: 0 additions & 30 deletions Alcatraz/ATZVersion.h

This file was deleted.

2 changes: 1 addition & 1 deletion Alcatraz/Alcatraz-Info.plist
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1.8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
3 changes: 1 addition & 2 deletions Alcatraz/Controllers/ATZPluginWindowController.m
Expand Up @@ -26,7 +26,6 @@
#import "ATZDownloader.h"
#import "Alcatraz.h"
#import "ATZPackageFactory.h"
#import "ATZVersion.h"

#import "ATZPlugin.h"
#import "ATZColorScheme.h"
Expand Down Expand Up @@ -274,7 +273,7 @@ - (void)displayImage:(NSImage *)image withTitle:(NSString*)title {
}

- (void)addVersionToWindow {
self.versionTextField.stringValue = @(ATZ_VERSION);
self.versionTextField.stringValue = [[[Alcatraz sharedPlugin] bundle] infoDictionary][@"CFBundleShortVersionString"];
}

@end
5 changes: 2 additions & 3 deletions Makefile
@@ -1,10 +1,9 @@
ARCHIVE = "Alcatraz.tar.gz"
BUNDLE_NAME = "Alcatraz.xcplugin"
VERSION_LOCATION = "Alcatraz/ATZVersion.h"
INSTALL_PATH = ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/${BUNDLE_NAME}/
TEST_BUILD_ARGS = -workspace TestProject/TestProject.xcworkspace -scheme TestProject
XCODEBUILD = xcodebuild $(TEST_BUILD_ARGS)
VERSION = $(shell grep 'ATZ_VERSION' Alcatraz/ATZVersion.h | cut -d " " -f 3 | tr -d '"')
VERSION = $(shell /usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" Alcatraz/Alcatraz-Info.plist)

default: test

Expand Down Expand Up @@ -56,6 +55,6 @@ tag:
git tag $(VERSION)

update_install_url:
sed -i '' -e 's/[.0-9]\{3,5\}/${VERSION}/' Scripts/install.sh
sed -i '' -Ee 's/[0-9]+(\.[0-9]+){2}/${VERSION}/' Scripts/install.sh
git commit -am "updated install script for version $(VERSION)"

0 comments on commit 6ae6806

Please sign in to comment.