Skip to content

Commit

Permalink
Some code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
koralcem committed Jun 15, 2018
1 parent ee58171 commit fa8197d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
22 changes: 8 additions & 14 deletions lib/glitter/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
module Glitter
# Command line interface for cutting glitter builds
class CLI < Thor
desc "push", "pushes a build to a channel with release notes."
method_option :version, :type => :string, :aliases => "-v", :required => true
method_option :channel, :type => :string, :aliases => "-c", :required => true
method_option :notes, :type => :string, :aliases => "-n"
method_option :force, :type => :boolean, :aliases => "-f"
method_option :bundle_version, :type => :string, :aliases => "-b"
method_option :minimum_system_version, :type => :string, :aliases => "-m"
desc "push", "Pushes a build to a channel with release notes."
method_option :version, :type => :string, :aliases => "-v", :required => true
method_option :channel, :type => :string, :aliases => "-c", :required => true
method_option :notes, :type => :string, :aliases => "-n"
method_option :force, :type => :boolean, :aliases => "-f"
method_option :bundle_version, :type => :string, :aliases => "-b"
method_option :minimum_system_version, :type => :string, :aliases => "-m"
def push(executable_path, *asset_paths)
release = Release::Sparkle.new(channel, options.version)
release.minimum_system_version = options.minimum_system_version
Expand Down Expand Up @@ -46,12 +46,6 @@ def version
puts Glitter::VERSION
end

# desc "yank", "remove a build from a release channel"
# method_option :version, :type => :string, :aliases => "-v"
# method_option :channel, :type => :string, :aliases => "-c"
# def yank
# end

private
def channel
server.channel(options.channel)
Expand All @@ -61,4 +55,4 @@ def server
@server ||= Server.new
end
end
end
end
1 change: 1 addition & 0 deletions spec/lib/glitter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Glitter::Server.new
end

# Note that running this spec *will* upload a single file to your S3 bucket
it "should release to channel" do
Glitter::Release::Sparkle.new server.channel('test-channel'), "1.1.2-#{rand}" do |r|
r.executable = File.open(__FILE__)
Expand Down

0 comments on commit fa8197d

Please sign in to comment.