#!/usr/bin/env ruby -wKU require 'time' def test var message unless var puts message exit end end mac_path = File.expand_path(File.dirname(File.expand_path(__FILE__)) + "/..") release_path = mac_path + "/build/Release/" version = `defaults read \"#{release_path}/Tentia.app/Contents/Info\" CFBundleVersion`.gsub(/\n/,'') length = `stat -f %z \"#{release_path}/Tentia.app.zip\"`.gsub(/\n/,'') signature = `ruby \"#{mac_path}/../../../Sparkle\ 1.5b6/Extras/Signing Tools/sign_update.rb\" \"#{release_path}/Tentia.app.zip\" \"#{path}/public/dsa_priv.pem\"`.gsub(/\n/,'') test version "Couldn't find version" test length "Couldn't find length" test signature "Couldn't find signature" unless File.exists? "#{release_path}/Tentia.app/Contents/dsa_pub.pem" puts "dsa_pub.pem is not in place." exit end xml = < Tentia's Changelog http://jabs.nu/Tentia/download/Appcast.xml Most recent changes with links to updates. en Version #{version} 10.5.0 http://jabs.nu/Tentia/download/ReleaseNotes.html #{Time.now.rfc2822} XML puts "EXIT" exit File.open("#{path}/Appcast.xml", 'w') {|f| f.write(xml) } system "scp \"#{path}/../build/Release/Tentia.app.zip\" jeena@jeena.net:~/jabs.nu/public/Tentia/download/" system "scp \"#{path}/ReleaseNotes.html\" jeena@jeena.net:~/jabs.nu/public/Tentia/download/" system "scp \"#{path}/Appcast.xml\" jeena@jeena.net:~/jabs.nu/public/Tentia/download/" puts "Done."