Class: Glitter::CLI
- Inherits:
-
Thor
- Object
- Thor
- Glitter::CLI
- Defined in:
- lib/glitter/cli.rb
Overview
Command line interface for cutting glitter builds
Instance Method Summary collapse
- #channels ⇒ Object
- #push(executable_path, *asset_paths) ⇒ Object
- #version ⇒ Object
- #versions ⇒ Object
Instance Method Details
#channels ⇒ Object
38 39 40 41 42 |
# File 'lib/glitter/cli.rb', line 38 def channels server.channel_versions.each do |channel, _| puts channel end end |
#push(executable_path, *asset_paths) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/glitter/cli.rb', line 13 def push(executable_path, *asset_paths) release = Release::Sparkle.new(channel, .version) release.minimum_system_version = .minimum_system_version release.bundle_version = .bundle_version release.notes = .notes release.executable = File.open executable_path # For more complex releases, additional assets may need to go out with the build. asset_paths.each do |path| release.assets[File.basename(path)].tap do |asset| asset.content = File.open path asset.content_type = 'application/octet-stream' end end release.push(:force => .force).head end |
#version ⇒ Object
45 46 47 |
# File 'lib/glitter/cli.rb', line 45 def version puts Glitter::VERSION end |
#versions ⇒ Object
31 32 33 34 35 |
# File 'lib/glitter/cli.rb', line 31 def versions channel.versions.each do |version| puts version end end |