Class: Baps::Deb

Inherits:
Object
  • Object
show all
Defined in:
lib/baps/deb.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Deb

Returns a new instance of Deb.

Raises:

  • (StandardError)


3
4
5
6
# File 'lib/baps/deb.rb', line 3

def initialize(&block)
  raise StandardError.new('Nothing defined') unless block_given?
  instance_eval(&block)
end

Instance Method Details

#already_exist?Boolean

Returns:

  • (Boolean)


8
9
10
11
# File 'lib/baps/deb.rb', line 8

def already_exist?
  return false unless Executor.publish?
  Baps.packagecloud.package_exist?(name: name, version: version, release: release)
end

#createObject



13
14
15
16
17
# File 'lib/baps/deb.rb', line 13

def create
  build.start
  package
  publish if Executor.publish?
end