Permalink
Browse files

Change how TVShows handles version numbers

  • Loading branch information...
1 parent 64fe9d0 commit 8d59fb39ea953af896f9a9067a759bc403d7cdf3 @mattprice mattprice committed Oct 3, 2009
View
@@ -71,8 +71,6 @@
- (void)downloadShowListDidFinish: (NSNotification *)notification;
// Setters/getters
-- (NSArray *)qualities;
-- (void)setQualities: (NSArray *)someQualities;
- (NSDictionary *)shows;
- (void)setShows: (NSDictionary *)someShows;
- (NSArray *)details;

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Binary file not shown.
View
@@ -146,15 +146,15 @@ - (id) init {
[self chmodFolderAtPath:launchAgentsFolder];
// Remove scriptFolder if we have a newer version to install
- if ( [fm fileExistsAtPath:scriptPath] ) {
+ if ([fm fileExistsAtPath:scriptPath]) {
NSString *scriptVersion = [[NSUserDefaults standardUserDefaults] objectForKey:@"ScriptVersion"];
- if ( !scriptVersion || NSOrderedAscending == [scriptVersion compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] options:NSNumericSearch] )
- if ( ![fm removeFileAtPath:scriptFolder handler:nil] )
+ if (!scriptVersion || [scriptVersion compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] options:NSCaseInsensitiveSearch] )
+ if (![fm removeFileAtPath:scriptFolder handler:nil])
[Helper dieWithErrorMessage:@"Could not remove the TVShows script folder in the Application Support folder in order to install the new one."];
}
// Install the script in the Application Support folder
- if ( ![fm fileExistsAtPath:scriptFolder] ) {
+ if (![fm fileExistsAtPath:scriptFolder]) {
if ( ![fm copyPath:resourcesScriptFolder toPath:scriptFolder handler:nil] ) {
[Helper dieWithErrorMessage:@"Could not copy the TVShows script in the Application Support folder."];
} else {
View
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>${CURRENT_PROJECT_VERSION}</string>
+ <string>${CURRENT_BUNDLE_SHORT}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
@@ -274,7 +274,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /usr/bin/ruby;
- shellScript = "if ENV[\"CONFIGURATION\"] == \"Release\" then\n\tfolder = \"#{ENV[\"TARGET_BUILD_DIR\"]}\"\n\tfile = \"#{ENV[\"TARGET_NAME\"]}_#{ENV[\"CURRENT_PROJECT_VERSION\"]}.zip\"\n\tappname = \"#{ENV[\"TARGET_NAME\"]}_#{ENV[\"CURRENT_PROJECT_VERSION\"]}\"\n\tpath = File.join(folder,file)\n#\t`mv \"#{folder}/TVShows\" ~/.Trash`\n#\t`mv #{folder}/*.zip ~/.Trash`\n#\t`mv #{folder}/appcast.xml ~/.Trash`\n\t`mkdir \"#{folder}/#{appname}\"`\n\t`cp \"#{File.join(ENV[\"PROJECT_DIR\"],\"..\",\"utils\",\"uninstall.sh\")}\" \"#{folder}/#{appname}\"`\n\t`mv \"#{folder}/#{ENV[\"FULL_PRODUCT_NAME\"]}\" \"#{folder}/#{appname}\"`\n\t`cd \"#{folder}\" && zip -qr \"#{file}\" #{appname}`\n\tkey = `openssl dgst -sha1 -binary < \"#{path}\" | openssl dgst -dss1 -sign \"#{File.join(\"#{ENV[\"PROJECT_DIR\"]}\",\"..\",\"appcast\",\"dsa_priv.pem\")}\" | openssl enc -base64`\n\tkey = key.split(\"\\n\").first\n\tFile.open(\"#{folder}/appcast.xml\", \"w\") { |f|\n\t\tf << \"<item>\\n\"\n\t\tf << \"\\t<title>TVShows #{ENV[\"CURRENT_PROJECT_VERSION\"]}</title>\\n\"\n\t\tf << \"\\t<pubDate>#{Time.now}</pubDate>\\n\"\n\t\tf << \"\\t<enclosure sparkle:version=\\\"#{ENV[\"CURRENT_PROJECT_VERSION\"]}\\\" sparkle:dsaSignature=\\\"#{key}\\\" url=\\\"http://deathtobunnies.com/tvshows/releases/#{file}\\\" length=\\\"#{File.size(path)}\\\" type=\\\"application/octet-stream\\\"/>\\n\"\n\t\tf << \"\\t<description><![CDATA[<h3 style=\\\"font-weight:bold;\\\">TVShows #{ENV[\"CURRENT_PROJECT_VERSION\"]}</h3>\\n\"\n\t\tf << \"\\t\\t<br />\\n\"\n\t\tf << \"\\t\\t<h3>Changes:</h3>\\n\"\n\t\tf << \"\\t\\t<ul>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t</ul>\\n\\t]]></description>\\n\"\n\t\tf << \"</item>\"\n\t}\nend\n\n";
+ shellScript = "if ENV[\"CONFIGURATION\"] == \"Release\" then\n\tfolder = \"#{ENV[\"TARGET_BUILD_DIR\"]}\"\n\tfile = \"#{ENV[\"TARGET_NAME\"]}_#{ENV[\"CURRENT_BUNDLE_SHORT\"]}.zip\"\n\tappname = \"#{ENV[\"TARGET_NAME\"]}_#{ENV[\"CURRENT_BUNDLE_SHORT\"]}\"\n\tpath = File.join(folder,file)\n#\t`mv \"#{folder}/TVShows\" ~/.Trash`\n#\t`mv #{folder}/*.zip ~/.Trash`\n#\t`mv #{folder}/appcast.xml ~/.Trash`\n\t`mkdir \"#{folder}/#{appname}\"`\n\t`cp \"#{File.join(ENV[\"PROJECT_DIR\"],\"..\",\"utils\",\"uninstall.sh\")}\" \"#{folder}/#{appname}\"`\n\t`mv \"#{folder}/#{ENV[\"FULL_PRODUCT_NAME\"]}\" \"#{folder}/#{appname}\"`\n\t`cd \"#{folder}\" && zip -qr \"#{file}\" #{appname}`\n\tkey = `openssl dgst -sha1 -binary < \"#{path}\" | openssl dgst -dss1 -sign \"#{File.join(\"#{ENV[\"PROJECT_DIR\"]}\",\"..\",\"appcast\",\"dsa_priv.pem\")}\" | openssl enc -base64`\n\tkey = key.split(\"\\n\").first\n\tFile.open(\"#{folder}/appcast.xml\", \"w\") { |f|\n\t\tf << \"<item>\\n\"\n\t\tf << \"\\t<title>TVShows #{ENV[\"CURRENT_BUNDLE_SHORT\"]}</title>\\n\"\n\t\tf << \"\\t<pubDate>#{Time.now}</pubDate>\\n\"\n\t\tf << \"\\t<enclosure sparkle:version=\\\"#{ENV[\"CURRENT_PROJECT_VERSION\"]}\\\" sparkle:shortVersionString=\\\"#{ENV[\"CURRENT_BUNDLE_SHORT\"]}\\\" sparkle:dsaSignature=\\\"#{key}\\\" url=\\\"http://deathtobunnies.com/tvshows/releases/#{file}\\\" length=\\\"#{File.size(path)}\\\" type=\\\"application/octet-stream\\\"/>\\n\"\n\t\tf << \"\\t<description><![CDATA[<h3 style=\\\"font-weight:bold;\\\">TVShows #{ENV[\"CURRENT_BUNDLE_SHORT\"]}</h3>\\n\"\n\t\tf << \"\\t\\t<br />\\n\"\n\t\tf << \"\\t\\t<h3>Changes:</h3>\\n\"\n\t\tf << \"\\t\\t<ul>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t\\t<li></li>\\n\"\n\t\tf << \"\\t\\t</ul>\\n\\t]]></description>\\n\"\n\t\tf << \"</item>\"\n\t}\nend";
};
/* End PBXShellScriptBuildPhase section */
@@ -386,25 +386,29 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CURRENT_BUNDLE_SHORT = 0.4.3b;
CURRENT_PROJECT_VERSION = 0.4.2;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IBC_STRIP_NIBS = NO;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CURRENT_BUNDLE_SHORT = 0.4.3b;
CURRENT_PROJECT_VERSION = 0.4.2;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IBC_STRIP_NIBS = NO;
+ IBC_STRIP_NIBS = YES;
PREBINDING = NO;
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};

0 comments on commit 8d59fb3

Please sign in to comment.