diff --git a/Application/AppController.m b/Application/AppController.m index 15050cfcd..93ee46535 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -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 diff --git a/Info.plist b/Info.plist index bd04e3f90..bc9296912 100644 --- a/Info.plist +++ b/Info.plist @@ -1027,6 +1027,6 @@ NSPrincipalClass MediaKeysApplication SUFeedURL - https://www.kode54.net/cog/mercury.xml + https://f.losno.co/cog/mercury.xml diff --git a/Preferences/General/AppcastArrayController.m b/Preferences/General/AppcastArrayController.m index 8a35efa35..ed2242c4a 100644 --- a/Preferences/General/AppcastArrayController.m +++ b/Preferences/General/AppcastArrayController.m @@ -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 diff --git a/Scripts/update_feed.rb b/Scripts/update_feed.rb index 030e77870..e64e6b542 100755 --- a/Scripts/update_feed.rb +++ b/Scripts/update_feed.rb @@ -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