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
36 37 38 39 40 |
# File 'lib/glitter/cli.rb', line 36 def channels server.channel_versions.each do |channel, _| puts channel end end |
#push(executable_path, *asset_paths) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/glitter/cli.rb', line 12 def push(executable_path, *asset_paths) release = Release::Sparkle.new(channel, .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
43 44 45 |
# File 'lib/glitter/cli.rb', line 43 def version puts Glitter::VERSION end |
#versions ⇒ Object
29 30 31 32 33 |
# File 'lib/glitter/cli.rb', line 29 def versions channel.versions.each do |version| puts version end end |