github.com/hashicorp/packer@v1.14.3/website/content/docs/upgrade/v1_13.mdx (about) 1 --- 2 page_title: Upgrade to v1.13 3 description: Learn how to upgrade your Packer installation to v1.13 4 --- 5 6 # Upgrade to v1.13 7 8 The topic describes upgrade considerations for Packer v1.13. Refer to the [v1.13 release notes](/packer/docs/release-notes/v1_13) for details about changes in v1.13. 9 10 ## Overview 11 12 You can use the upgrade command for the package manager you installed Packer with or download and replace the existing binary to upgrade Packer. Refer to [Install Packer](https://developer.hashicorp.com/packer/install) for instructions. 13 14 ## Upgrade from 1.12 15 16 Packer 1.13's notable changes can be summarised by the following points: 17 18 1. Provisioner Enhancement 19 2. New functions Support 20 3. Packer fmt command to format multiple HCL files 21 4. Top-Level hcp_packer_registry Block Support 22 23 **Note**: The Powershell provisioner changes are breaking changes. 24 25 ## Provisioner Enhancement 26 27 The `shell` provisioner’s inline field now supports executing scripts directly, including those with their own shebang (#!) lines. 28 This enhancement allows you to provide a full script as an inline command, enabling dynamic scripts via tools like templatefile. 29 30 Added a wrapper around inline `PowerShell` commands executed by the provisioner to catch errors and ensure the Packer build fails if any command results in an error. 31 32 ## New functions Support 33 34 As part of Packer 1.13, we have introduced more functions. 35 36 * `sum`: takes a list or set of numbers and returns the sum of those numbers.. 37 * `startswith`: takes two values: a string to check and a prefix string. The function returns true if the string begins with that exact prefix. 38 * `endswith`: takes two values: a string to check and a suffix string. The function returns true if the first string ends with that exact suffix. 39 40 ## Packer fmt command to format multiple HCL files 41 42 Added the ability for the packer fmt command to format multiple HCL files at once. 43 44 ## Top-Level hcp_packer_registry Block Support 45 46 Added support for defining the `hcp_packer_registry` block at the top level of the Packer configuration. Enables improved management and referencing of HCP Packer registries directly in the root schema. 47 48