Sha256: f84abbc5bea7a0cf40abf27f184a50f133f341b17bdd6fab926e2edc7048fc39

Contents?: true

Size: 890 Bytes

Versions: 1

Compression:

Stored size: 890 Bytes

Contents

module Cloudspin
  module Stack
    module Rake

      class ArtefactTask < ::Rake::TaskLib

        def initialize(definition_folder:, dist_folder:)
          @definition_folder = definition_folder
          @dist_folder = dist_folder
          define
        end

        def define
          desc 'Assemble files to be packaged'
          task :build do |t, args|
            builder.build
          end

          desc 'Package the artefact'
          task :package do |t, args|
            builder.package
          end
        end

        def builder
          Cloudspin::Stack::Artefact::Builder.new(stack_definition: stack_definition,
                                                  dist_folder: @dist_folder)
        end

        def stack_definition
          Cloudspin::Stack::Definition.from_file(@definition_folder + '/stack.yaml')
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cloudspin-stack-artefact-0.1.2 lib/cloudspin/stack/rake/artefact_task.rb