lib/motion/project/rake_tasks.rb in motion-sparkle-sandbox-2.0.0 vs lib/motion/project/rake_tasks.rb in motion-sparkle-sandbox-2.0.1
- old
+ new
@@ -1,20 +1,29 @@
-# Rake tasks
+# frozen_string_literal: true
+
+# Sparkle specific rake tasks
namespace :sparkle do
+ desc 'Sparkle Help'
+ task :help do
+ puts <<~HELP
+ During initial Sparkle setup, run these rake tasks:
- task :install do
- sparkle = App.config.sparkle
- sparkle.install
+ 1. `rake sparkle:setup_certificates`
+ 2. `rake sparkle:setup`
+
+ Then after running `rake build:release`, you can run
+ `rake sparkle:package`
+ HELP
end
- desc "Setup Sparkle configuration"
+ desc 'Setup Sparkle configuration'
task :setup do
sparkle = App.config.sparkle
sparkle.setup
end
- desc "Create a ZIP file with you application .app release build"
+ desc 'Create a ZIP file with your application .app release build'
task :package do
App.config_without_setup.build_mode = :release
sparkle = App.config.sparkle
sparkle.package
end
@@ -22,53 +31,40 @@
task :setup_certificates do
sparkle = App.config.sparkle
sparkle.generate_keys
end
- desc "Sign the ZIP file with appropriate certificates"
+ desc 'Generate the EdDSA signature for a package'
task :sign do
App.config_without_setup.build_mode = :release
sparkle = App.config.sparkle
sparkle.sign_package
end
- task :recreate_public_key do
- sparkle = App.config.sparkle
- sparkle.generate_public_key
- end
-
- task :copy_release_notes_templates do
+ desc "Generate the appcast xml feed using Sparkle's `generate_appcast`"
+ task :generate_appcast do
App.config_without_setup.build_mode = :release
sparkle = App.config.sparkle
- sparkle.copy_templates(force = true)
+ sparkle.generate_appcast
end
- desc "Generate the appcast xml feed"
- task :feed do
- App.config_without_setup.build_mode = :release
- sparkle = App.config.sparkle
- sparkle.create_appcast
+ namespace :generate_appcast do
+ desc "Show help for Sparkle's `generate_appcast`"
+ task :help do
+ App.config_without_setup.build_mode = :release
+ sparkle = App.config.sparkle
+ sparkle.generate_appcast_help
+ end
end
- desc "Generate the appcast using Sparkle's `generate_appcast`"
- task :generate_appcast do
- App.config_without_setup.build_mode = :release
- sparkle = App.config.sparkle
- results = `#{sparkle.sparkle_vendor_path}/generate_appcast "#{sparkle.private_key_path}" "#{sparkle.archive_folder}"`
- end
-
- desc "Update the release notes of this build"
+ desc 'Update the release notes of this build'
task :release_notes do
App.config_without_setup.build_mode = :release
sparkle = App.config.sparkle
sparkle.create_release_notes
end
- desc "Upload to configured location"
- task :upload do
- end
-
- desc "Clean the Sparkle release folder"
+ desc 'Clean the Sparkle release folder'
task :clean do
dir = Motion::Project::Sparkle::RELEASE_PATH
if File.exist?("./#{dir}")
App.info 'Delete', "./#{dir}"
rm_rf dir