Class: Everywhere::Commands::Publish

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/everywhere/commands/publish.rb

Overview

Publish a released build to the app's update bucket — the free, self-hosted half of auto-updates. Reads the receipt every release wrote, signs the artifact, uploads it plus the manifests to any S3-compatible bucket, and cuts latest.json over LAST so shipped apps only ever see a complete release.

Bucket creds come from the standard AWS env vars; endpoint/bucket/etc. from everywhere.yml's updates.s3 section. See UpdateManifest for the layout/JSON contract.

Instance Method Summary collapse

Instance Method Details

#call(root: ".", receipt: nil, channel: nil, notes: nil, notes_file: nil, key: nil, rollback_to: nil, latest_alias: true, force: false) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/everywhere/commands/publish.rb', line 36

def call(root: ".", receipt: nil, channel: nil, notes: nil, notes_file: nil, key: nil,
         rollback_to: nil, latest_alias: true, force: false, **)
  @root = File.expand_path(root)
  @config = Everywhere::Config.load(@root)
  @channel = channel || @config.updates_channel
  preflight!

  if rollback_to
    rollback!(rollback_to, latest_alias: latest_alias)
  else
    publish!(receipt_path(receipt), notes: read_notes(notes, notes_file),
             key: key, latest_alias: latest_alias, force: force)
  end
end