Zharp.Release (Zharp v0.1.0)

Copy Markdown View Source

Packs the app's own source into a mix release, so errors show the code that ran.

A release ships compiled .beam files, not the .ex sources. This release step copies the lib/ (and src/) of the project's own applications into the release, next to Zharp, and Zharp reads the lines around an error from there, on your server. Nothing is uploaded.

# mix.exs
def project do
  [
    ...,
    releases: [
      my_app: [steps: [:assemble, &Zharp.Release.package_source/1]]
    ]
  ]
end

Put it after :assemble and before :tar. mix igniter.install zharp adds it. The step also records the project's applications (an umbrella's too), which is how Zharp tells your frames from Phoenix's: set config :zharp, in_app: [...] to choose them yourself.

Summary

Functions

The release step: returns the release unchanged.

Functions

package_source(release)

The release step: returns the release unchanged.