Skip to content

Releases: gruntwork-io/boilerplate

v0.3.6-alpha.1

07 Dec 20:04
b45266e
Compare
Choose a tag to compare
v0.3.6-alpha.1 Pre-release
Pre-release

DO NOT USE: integration testing release

v0.3.5: jsonnet support

02 Dec 14:48
71c7d15
Compare
Choose a tag to compare

#72: We now support rendering jsonnet files as an alternative to go templating. See the updated README for more details.

v0.3.4: skip_files for conditionally skipping files

16 Nov 22:18
335c3b6
Compare
Choose a tag to compare

#71: This release introduces skip_files in the configuration, which can be used to conditionally skip files in the template folder. Refer to the relevant section in the README for more info.

v0.3.3: Add `toYaml` function

04 Nov 17:50
e0a87fc
Compare
Choose a tag to compare

This release adds a new helper function called toYaml that will render a given input variable to a YAML string. This is similar to the toJson sprig function.

v0.3.2: Support rendering variable inputs to json

30 Oct 18:21
c274f0f
Compare
Choose a tag to compare

This release fixes an issue with using toJson and related sprig functions within Boilerplate templates. It's now possible to read variable inputs from Boilerplate YML files and render those to JSON.

See related PR.

v0.3.1: Add partials feature

26 Oct 20:59
3bee92b
Compare
Choose a tag to compare

Adds the new partials feature for better template reuse.

v0.3.0

31 Aug 15:14
c6198a5
Compare
Choose a tag to compare

#59 : We now support remote template sources. Note that this includes a configuration change from template-folder to template-url in dependencies, as well as renaming the CLI arg.

v0.2.26

17 Dec 02:06
1f402c1
Compare
Choose a tag to compare

#54: Introduce include, a helper function that will render another file through the templating engine and output the contents.

v0.2.25

08 Jul 17:17
de848e1
Compare
Choose a tag to compare

#52 and #53: Apply README.md updates for v0.2.24.

v0.2.24

15 May 17:08
Compare
Choose a tag to compare

#49: This integrates sprig into boilerplate so that the sprig functions are available in the templates rendered by boilerplate. Note that there are a few boilerplatefunctions that overlap withsprig. Each of these are now documented in the README. As such, starting this release those helpers are deprecated, and will be replaced with the sprig` versions in a future release. Please review the deprecation notes in the README, pasted below for convenience.

Deprecated helpers

These helpers are deprecated. They are currently available for backwards compatibility, but may be removed in future
versions. Please use the alternative supported forms listed in the description.

The following functions overlap with sprig, but have different functionality. There is an equivalent function listed
above under a different name. These point to the boilerplate implementations for backwards compatibility. Please migrate
to using the new naming scheme, as they will be updated to use the sprig versions in future versions of boilerplate.

  • round: In boilerplate, round returns the integer form as opposed to float. E.g {{ round 123.5555 }} will return
    124. The following supported alternative functions are available:
    • roundFloat: The sprig version of round, which supports
      arbitrary decimal rounding. E.g {{ round 123.5555 3 }} returns 123.556. Note that {{ round 123.5555 0 }}
      returns 124.0.
    • roundInt: Another name for the boilerplate version of round. Use this if you would like to keep old behavior.
  • ceil and floor: In boilerplate, ceil and floor return integer forms as opposed to floats. E.g {{ ceil 1.1 }} returns 2, as opposed to 2.0 in the sprig version. The following supported alternative functions are
    available:
    • ceilFloat and floorFloat: The sprig version of ceil and
      floor.
    • ceilInt and floorInt: Another name for the boilerplate version ceil and floor. Use this if you would like to keep old behavior.
  • env: In boilerplate, env supports returning a default value if the environment variable is not defined. The
    following supported alternative functions are available:
    • readEnv: The sprig version of env. This always returns empty
      string if the environment variable is undefined.
    • envWithDefault: Another name for the boilerplate version of env. Use this if you would like to keep old
      behavior.
  • keys: In boilerplate, keys returns the keys of the map in sorted order. The following supported alternative
    functions are available:
    • keysUnordered: The sprig version of keys. This returns the
      list of keys in no particular order, and there is no guarantee that the order of the returned list is consistent.
    • keysSorted: Another name for the boilerplate version of keys. Use this if you would like to keep old
      behavior.
  • replace: In boilerplate, replace only replaces the first occurrence in the string, as opposed to all occurrences
    as in sprig. The following supported alternative functions are available:
    • replaceAll: The sprig version of replace.
    • replaceOne: Another name for the boilerplate version of replace. Use this if you would like to keep old
      behavior.
  • slice: In boilerplate, slice returns a list of numbers in the provided range. E.g {{ slice 1 5 1 }} returns
    the list [1, 2, 3, 4]. The following supported alternative functions are available:
    • sliceList: The sprig version of slice, which returns the
      slice of the given list. E.g {{ slice list n m }} returns list[n:m].
    • numRange: Another name for the boilerplate version of slice. Use this if you would like to keep old
      behavior.
  • trimPrefix and trimSuffix: In boilerplate, trimPrefix and trimSuffix takes the base string first. E.g
    {{ trimPrefix hello-world hello }} returns -world. The following supported alternative functions are available:
    • trimPrefixSprig and trimSuffixSprig: The sprig version of
      trimPrefix and
      trimSuffix. Unlike the boilerplate version, this takes the trim text first so that you can pipeline the trimming. E.g {{ "hello-world" | trimPrefix "hello" }} returns {{ -world }}.
    • trimPrefixBoilerplate and trimSuffixBoilerplate: Another name for the boilerplate versions of trimPrefix
      and trimSuffix. Use this if you would like to keep old behavior.