Class: Glitter::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/glitter/cli.rb

Overview

Command line interface for cutting glitter builds

Instance Method Summary collapse

Instance Method Details

#channelsObject



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, options.version)
  release.minimum_system_version = options.minimum_system_version
  release.bundle_version = options.bundle_version
  release.notes       = options.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 => options.force).head
end

#versionObject



45
46
47
# File 'lib/glitter/cli.rb', line 45

def version
  puts Glitter::VERSION
end

#versionsObject



31
32
33
34
35
# File 'lib/glitter/cli.rb', line 31

def versions
  channel.versions.each do |version|
    puts version
  end
end