Class: Physique::OctopusPack::Task

Inherits:
Object
  • Object
show all
Includes:
Albacore::Logging
Defined in:
lib/physique/tasks/octopus_pack.rb

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Task

Returns a new instance of Task.



41
42
43
44
45
46
47
# File 'lib/physique/tasks/octopus_pack.rb', line 41

def initialize(opts)
  @opts = opts
  @project = Albacore::Project.new opts.project_file

  opts..id = @project.name if @project.name
  @package = Albacore::NugetModel::Package.new opts.
end

Instance Method Details

#executeObject



49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/physique/tasks/octopus_pack.rb', line 49

def execute
  if @opts.type == :website
    add_content_files
    add_binary_files target: 'bin'
  else
    add_content_files
    add_binary_files
  end

  nuspec_path = write_nuspec!
  create_nuget! @project.proj_path_base, nuspec_path
ensure
  cleanup_nuspec nuspec_path
end