Sha256: d09cd818d8fa327082fa034118e20cf8658b0aae92e5265ad0bcca6dcc857e11

Contents?: true

Size: 752 Bytes

Versions: 13

Compression:

Stored size: 752 Bytes

Contents

module  Opsk
  class DeployBintray < Thor::Group
    include Thorable, Thor::Actions

    argument :repo, :type => :string, :desc => 'bintray repo'

    desc 'Deploy sandbox into bintray.com'

    def validate
	check_root
    end


    def upload
	require 'bintray_deploy'
	pkg = Opsk::Package.new
	tar =  "#{pkg.artifact_path}.tar.gz"
	base = File.basename(tar)
	if(File.exists?(tar))
	  begin
	    BintrayDeploy::Actions.new.deploy(repo, "#{pkg.meta.name}-sandbox", pkg.meta.version, tar)
	    say("deployed #{base} to http://dl.bintray.com/#{C.user}/#{repo}/#{base}")
	  rescue Exception => e
          say("failed to deploy due to #{e}")
	  end
	else
	  say('package is missing please run opsk package first')
	  exit(1)
	end
    end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
opskeleton-0.10.1 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.9 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.8 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.7 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.6 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.5 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.4 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.3 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.2 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.1 lib/opskeleton/deploy_bintray.rb
opskeleton-0.9.0 lib/opskeleton/deploy_bintray.rb
opskeleton-0.8.12 lib/opskeleton/deploy_bintray.rb
opskeleton-0.8.11 lib/opskeleton/deploy_bintray.rb