Sha256: 3ae22136f09c83e1b1508f6b4b15a2739e13e5d9c949add892c4a46e72975ef3

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 Bytes

Contents

module Caco::Debian
  class AptRepoAdd < Trailblazer::Operation
    step ->(ctx, url:, release:, component:, **) {
        ctx[:content] = "deb #{url} #{release} #{component}"
      },
      id: :build_repo_content

    step ->(ctx, name:, **) {
        ctx[:path] = "/etc/apt/sources.list.d/#{name}.list"
      },
      id: :build_repo_path

    step Subprocess(Caco::FileWriter),
      input: [:path, :content],
      output: { file_created: :repo_created, file_changed: :repo_changed }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caco-0.1.0 lib/caco/debian/apt_repo_add.rb