Updated nightly script. Allow appcast selection in preferences.

CQTexperiment
vspader 2007-05-19 15:07:03 +00:00
parent 9c7a405f83
commit b6227ecf1d
9 changed files with 76 additions and 40 deletions

View File

@ -395,6 +395,8 @@ increase/decrease as long as the user holds the left/right, plus/minus button */
[userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"remoteEnabled"];
[userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"remoteOnlyOnActive"];
[userDefaultsValuesDict setObject:@"http://cogx.org/appcast/stable.xml" forKey:@"SUFeedURL"];
//Register and sync defaults
[[NSUserDefaults standardUserDefaults] registerDefaults:userDefaultsValuesDict];
[[NSUserDefaults standardUserDefaults] synchronize];

View File

@ -1,6 +1,6 @@
<html>
<body style="text-align:center;">
Cog is brought to you by the letter Q and the number 14.
Cog is brought to you by Schadenfreude Inc, makers of Cheese Babies &trade; and other fine gourmet snacks.
<br /><br />
This program has been made possible through contributions from users like you.
</body>

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version='1.0'>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
@ -95,7 +98,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.06</string>
<string>BLARG!</string>
<key>CFBundleHelpBookFolder</key>
<string>Help</string>
<key>CFBundleHelpBookName</key>
@ -111,3 +114,5 @@
<string>http://cogosx.sourceforge.net/appcast.xml</string>
</dict>
</plist>

View File

@ -1,5 +1,10 @@
{
IBClasses = (
{
CLASS = AppcastArrayController;
LANGUAGE = ObjC;
SUPERCLASS = NSArrayController;
},
{
ACTIONS = {openSheet = id; };
CLASS = FileDrawerPane;

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>36 301 356 534 0 0 1440 878 </string>
<string>291 101 356 534 0 0 1680 1028 </string>
<key>IBEditorPositions</key>
<dict>
<key>10</key>
@ -13,7 +13,7 @@
<key>43</key>
<string>640 652 400 116 0 0 1680 1028 </string>
<key>50</key>
<string>640 662 400 96 0 0 1680 1028 </string>
<string>731 409 355 124 0 0 1680 1028 </string>
<key>58</key>
<string>634 659 411 101 0 0 1680 1028 </string>
<key>85</key>
@ -23,14 +23,14 @@
<string>446.1</string>
<key>IBOpenObjects</key>
<array>
<integer>10</integer>
<integer>43</integer>
<integer>58</integer>
<integer>11</integer>
<integer>50</integer>
<integer>11</integer>
<integer>10</integer>
<integer>58</integer>
<integer>85</integer>
<integer>43</integer>
</array>
<key>IBSystem Version</key>
<string>8L2127</string>
<string>8P2137</string>
</dict>
</plist>

View File

@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
170744AD0BFF3938002475C9 /* AppcastArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 170744AC0BFF3938002475C9 /* AppcastArrayController.m */; };
172D72AD0B8926CA00D095BB /* apple_remote.png in Resources */ = {isa = PBXBuildFile; fileRef = 172D72AC0B8926CA00D095BB /* apple_remote.png */; };
1766C7A80B912A71004A7AE4 /* lastfm.png in Resources */ = {isa = PBXBuildFile; fileRef = 1766C7A70B912A71004A7AE4 /* lastfm.png */; };
17C643380B8A77CC00C53518 /* OutputsArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17C643360B8A77CC00C53518 /* OutputsArrayController.m */; };
@ -34,6 +35,8 @@
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
170744AB0BFF3938002475C9 /* AppcastArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppcastArrayController.h; sourceTree = "<group>"; };
170744AC0BFF3938002475C9 /* AppcastArrayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppcastArrayController.m; sourceTree = "<group>"; };
172D72AC0B8926CA00D095BB /* apple_remote.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = apple_remote.png; path = Icons/apple_remote.png; sourceTree = "<group>"; };
1766C7A70B912A71004A7AE4 /* lastfm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = lastfm.png; path = Icons/lastfm.png; sourceTree = "<group>"; };
17C643360B8A77CC00C53518 /* OutputsArrayController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = OutputsArrayController.m; sourceTree = "<group>"; };
@ -162,6 +165,8 @@
17D503410ABDB1660022D1E8 /* Custom */ = {
isa = PBXGroup;
children = (
170744AB0BFF3938002475C9 /* AppcastArrayController.h */,
170744AC0BFF3938002475C9 /* AppcastArrayController.m */,
8E6C12120AACAE4100819171 /* NDHotKeyControl.h */,
8E6C12130AACAE4100819171 /* NDHotKeyControl.m */,
8E6C12140AACAE4100819171 /* NDHotKeyEvent.h */,
@ -271,6 +276,7 @@
8E6C13A00AACBAB500819171 /* HotKeyControl.m in Sources */,
17C643380B8A77CC00C53518 /* OutputsArrayController.m in Sources */,
17C6433F0B8A783F00C53518 /* OutputPane.m in Sources */,
170744AD0BFF3938002475C9 /* AppcastArrayController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -7,10 +7,10 @@ include REXML
appcast = open('http://cogx.org/appcast/nightly.xml')
doc = Document.new(appcast)
appcastdoc = Document.new(appcast)
#Get the latest revision from the appcast
appcast_revision = Regexp.new('\d+$').match(doc.elements['//channel/item/title'].text.to_s()).to_s().to_i() || 0
appcast_revision = Regexp.new('\d+$').match(appcastdoc.elements['//channel/item/title'].text.to_s()).to_s().to_i() || 0
#Update to the latest revision
latest_revision = %x[svn update | tail -n 1].gsub(/[^\d]+/, '').to_i()
@ -22,6 +22,18 @@ if appcast_revision < latest_revision
#Remove the previous build directories
%x[find . -type d -name build -print0 | xargs -0 rm -r ]
#Update the version in the plist
plist = open('info.plist')
plistdoc = Document.new(plist)
plist.close()
version_element = plistdoc.elements["//[. = 'CFBundleVersion']/following-sibling::string"];
version_element.text = "r#{latest_version}"
newplist = open('info.plist', 'w')
plistdoc.write(newplist, 2)
newplist.close()
#Build Cog!
%x[./Scripts/build_cog.sh].each_line do |line|
if line.match(/\*\* BUILD FAILED \*\*/)
@ -32,37 +44,39 @@ if appcast_revision < latest_revision
filename = "Cog-r#{latest_revision}.tbz2"
#Zip the app!
%x[tar cjf build/Release/#{filename} build/Release/Cog.app]
%x[rm -f build/Release/nightly.tar.bz2]
%x[tar -C build/Release -cjf build/Release/nightly.tar.bz2 Cog.app]
filesize = File.size("build/Release/#{filename}")
filesize = File.size("build/Release/nightly.tar.bz2")
#Send the new build to the server
%x[scp build/Release/#{filename} cogx@cogx.org:~/cogx.org/nightly_builds/]
%x[scp build/Release/nightly.tar.bz2 cogx@cogx.org:~/cogx.org/nightly_builds/#{filename}]
#Add new entry to appcast
new_item = Element.new('item')
new_item.add_element('title')
new_item.elements['title'].text = "Cog r#{latest_revision}"
new_item.add_element('description')
new_item.elements['description'].text = changelog
#Add new entry to appcast
new_item = Element.new('item')
new_item.add_element('title')
new_item.elements['title'].text = "Cog r#{latest_revision}"
new_item.add_element('description')
new_item.elements['description'].text = changelog
new_item.add_element('pubDate')
new_item.elements['pubDate'].text = Time.now().strftime("%a, %d %b %Y %H:%M:%S %Z") #RFC 822
new_item.add_element('enclosure')
new_item.elements['enclosure'].add_attribute('url', "http://cogx.org/nightly_builds/#{filename}")
new_item.elements['enclosure'].add_attribute('length', filesize)
new_item.elements['enclosure'].add_attribute('type', 'application/octet-stream')
doc.insert_before('//channel/item', new_item)
#Limit number of entries to 5
doc.delete_element('//channel/item[position()>5]')
new_xml = Tempfile.new('appcast.xml')
new_xml << doc.to_s()
new_item.add_element('pubDate')
new_item.elements['pubDate'].text = Time.now().strftime("%a, %d %b %Y %H:%M:%S %Z") #RFC 822
new_item.add_element('enclosure')
new_item.elements['enclosure'].add_attribute('url', "http://cogx.org/nightly_builds/#{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('version', "r#{latest_revision}")
appcastdoc.insert_before('//channel/item', new_item)
#Limit number of entries to 5
appcastdoc.delete_element('//channel/item[position()>5]')
new_xml = Tempfile.new('appcast.xml')
appcastdoc.write(new_xml, 2)
new_xml.close()
appcast.close()

4
TODO
View File

@ -5,3 +5,7 @@ Bug fixes:
Windows M3U paths: http://sbooth.org/forums/viewtopic.php?t=1209
? Playlist display: http://sbooth.org/forums/viewtopic.php?t=1050
Nightlies:
Fix path inside nightly builds.
Make preference for update channels. Stable, Unstable, and Nightly.
Get sparkle working with nightlies!