Class: BintrayDeploy::Actions
- Inherits:
-
Object
- Object
- BintrayDeploy::Actions
- Defined in:
- lib/bintray_deploy/actions.rb
Instance Method Summary collapse
Instance Method Details
#deploy(repo, pkg, name, path) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bintray_deploy/actions.rb', line 10 def deploy(repo, pkg, name, path) version = Version.new(:repo => repo, :pkg => pkg, :name=> name) unless (version.exists?) version.create begin Package.new(repo).upload(path, pkg, name) rescue Exception => e version.delete raise e end else puts 'version already exists skipping' end end |