Allows to Generate output files based on ERB templates

Renders an ERB template with placeholders given as a hash via parameter, if no :destination is set, returns rendered template as string

Supported platforms ios, android, mac
Author @hjanuschka

1 Example

# Example `erb` template:

# Variable1 <%= var1 %>
# Variable2 <%= var2 %>
# <% for item in var3 %>
#        <%= item %>
# <% end %>

  template: "1.erb",
  destination: "/tmp/rendered.out",
  placeholders: {
    :var1 => 123,
    :var2 => "string",
    :var3 => ["element1", "element2"]


Key Description Default
template ERB Template File
destination Destination file
placeholders Placeholders given as a hash {}

* = default value is dependent on the user's system

To show the documentation in your terminal, run

fastlane action erb

View source code

Back to actions