Update feed location and script.

CQTexperiment
Chris Moeller 2016-07-15 22:06:37 -07:00
parent aaf516fb00
commit 55ecd008ad
4 changed files with 26 additions and 15 deletions

View File

@ -354,9 +354,10 @@
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:8] forKey:@"hotKeySpamKeyCode"];
[userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSControlKeyMask|NSCommandKeyMask)] forKey:@"hotKeySpamModifiers"];
NSString * feedURLdefault = @"https://www.kode54.net/cog/mercury.xml";
NSString * feedURLdefault = @"https://f.losno.co/cog/mercury.xml";
NSString * feedURLbroken = @"https://kode54.net/cog/stable.xml";
NSString * feedURLbroken2 = @"https://kode54.net/cog/mercury.xml";
NSString * feedURLbroken3 = @"https://www.kode54.net/cog/mercury.xml";
[userDefaultsValuesDict setObject:feedURLdefault forKey:@"SUFeedURL"];
@ -381,7 +382,8 @@
//And if the existing feed URL is broken due to my ineptitude with the above defaults, fix it
if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"SUFeedURL"] isEqualToString:feedURLbroken] ||
[[[NSUserDefaults standardUserDefaults] stringForKey:@"SUFeedURL"] isEqualToString:feedURLbroken2])
[[[NSUserDefaults standardUserDefaults] stringForKey:@"SUFeedURL"] isEqualToString:feedURLbroken2] ||
[[[NSUserDefaults standardUserDefaults] stringForKey:@"SUFeedURL"] isEqualToString:feedURLbroken3])
[[NSUserDefaults standardUserDefaults] setValue:feedURLdefault forKey:@"SUFeedURL"];
//Add observers

View File

@ -1027,6 +1027,6 @@
<key>NSPrincipalClass</key>
<string>MediaKeysApplication</string>
<key>SUFeedURL</key>
<string>https://www.kode54.net/cog/mercury.xml</string>
<string>https://f.losno.co/cog/mercury.xml</string>
</dict>
</plist>

View File

@ -15,21 +15,21 @@
{
[self removeObjects:[self arrangedObjects]];
[self addObject:
[NSDictionary dictionaryWithObjectsAndKeys:
NSLocalizedStringFromTableInBundle(@"Stable", nil, [NSBundle bundleForClass:[self class]], @"") , @"name", @"http://mamburu.net/cog/stable.xml", @"url",nil]];
//[self addObject:
// [NSDictionary dictionaryWithObjectsAndKeys:
// NSLocalizedStringFromTableInBundle(@"Stable", nil, [NSBundle bundleForClass:[self class]], @"") , @"name", @"http://mamburu.net/cog/stable.xml", @"url",nil]];
// [self addObject:
// [NSDictionary dictionaryWithObjectsAndKeys:
// NSLocalizedStringFromTableInBundle(@"Unstable", nil, [NSBundle bundleForClass:[self class]], @"") , @"name", @"http://cogx.org/appcast/unstable.xml", @"url",nil]];
[self addObject:
[NSDictionary dictionaryWithObjectsAndKeys:
NSLocalizedStringFromTableInBundle(@"Nightly", nil, [NSBundle bundleForClass:[self class]], @"") , @"name", @"http://mamburu.net/cog/nightly.xml", @"url",nil]];
//[self addObject:
// [NSDictionary dictionaryWithObjectsAndKeys:
// NSLocalizedStringFromTableInBundle(@"Nightly", nil, [NSBundle bundleForClass:[self class]], @"") , @"name", @"http://mamburu.net/cog/nightly.xml", @"url",nil]];
[self addObject:
[NSDictionary dictionaryWithObjectsAndKeys:
NSLocalizedStringFromTableInBundle(@"kode54.net wheneverly", nil, [NSBundle bundleForClass:[self class]], @"") , @"name", @"https://www.kode54.net/cog/mercury.xml", @"url",nil]];
NSLocalizedStringFromTableInBundle(@"losnoco.net wheneverly", nil, [NSBundle bundleForClass:[self class]], @"") , @"name", @"https://f.losno.co/cog/mercury.xml", @"url",nil]];
}
@end

View File

@ -64,7 +64,7 @@ if appcast_revision < latest_revision
%x[rm -rf '#{temp_path}/Cog.app' '#{temp_path}/Cog.old' '#{temp_path}/Cog.zip']
#Retrieve the current full package
local_file = appcast_url.gsub(/https:\/\/www\.kode54\.net\/cog/, "#{site_dir}")
local_file = appcast_url.gsub(/https:\/\/f\.losno\.co\/cog/, "#{site_dir}/#{feed}_builds")
%x[cp '#{local_file}' '#{temp_path}/Cog.zip']
#Unpack and rename
@ -97,7 +97,10 @@ if appcast_revision < latest_revision
#Send the delta
%x[cp '#{temp_path}/#{feed}.delta' '#{site_dir}/#{feed}_builds/#{filename_delta}']
%x[rm '#{temp_path}/#{feed}.delta']
#Upload them to S3
%x[s3cmd put -P '#{site_dir}/#{feed}_builds/#{filename}' '#{site_dir}/#{feed}_builds}/#{filename_delta}' s3://balde.losno.co/cog/ --signature-v2]
#Clean up
%x[rm -rf '#{temp_path}/Cog.old' '#{temp_path}/Cog.app']
@ -117,14 +120,14 @@ if appcast_revision < latest_revision
new_item.elements['sparkle:minimumSystemVersion'].text = '10.7.0'
new_item.add_element('enclosure')
new_item.elements['enclosure'].add_attribute('url', "https://www.kode54.net/cog/#{feed}_builds/#{filename}")
new_item.elements['enclosure'].add_attribute('url', "https://f.losno.co/cog/#{filename}")
new_item.elements['enclosure'].add_attribute('length', filesize)
new_item.elements['enclosure'].add_attribute('type', 'application/octet-stream')
new_item.elements['enclosure'].add_attribute('sparkle:version', "#{latest_revision}")
new_item.add_element('sparkle:deltas')
new_item.elements['sparkle:deltas'].add_element('enclosure')
new_item.elements['sparkle:deltas'].elements['enclosure'].add_attribute('url', "https://www.kode54.net/cog/#{feed}_builds/#{filename_delta}")
new_item.elements['sparkle:deltas'].elements['enclosure'].add_attribute('url', "https://f.losno.co/cog/#{filename_delta}")
new_item.elements['sparkle:deltas'].elements['enclosure'].add_attribute('length', filesize_delta)
new_item.elements['sparkle:deltas'].elements['enclosure'].add_attribute('type', 'application/octet-stream')
new_item.elements['sparkle:deltas'].elements['enclosure'].add_attribute('sparkle:version', "#{latest_revision}")
@ -143,4 +146,10 @@ if appcast_revision < latest_revision
#Send the updated appcast to the server
%x[cp '#{new_xml.path}' '#{site_dir}/#{feed}.xml']
#Upload to S3
%x[s3cmd put -P '#{site_dir}/#{feed}.xml' s3://balde.losno.co/cog/ --signature-v2]
#Invalidate CDN
%x[aws cloudfront create-invalidation --distribution-id E1WUF11KRNP2VH --paths /cog/mercury.xml]
end