New feature: $version placeholder

To make the authoring process easier, it’s possible to replace the version number with $version – the version number will be inferred from the contents of the package and substituted during yak build . For example, take the following manifest.yml…

name: example
version: $version
authors: ["nobody"]
description: An example package

During the packaging process, the .gha will be inspected. The version number will be extracted and injected into the package’s manifest.yml…

$ yak build

Building package from contents of /Users/will/dev/tmp/yak/example

Found manifest.yml for package: example ($version)
Inspecting content: example.gha
Replacing version placeholder with "1.1.0" (from example.gha)
Creating example-1.1.0-rh6_1-mac.yak

name: example
version: 1.1.0
- nobody
description: An example package

├── example.gha
└── manifest.yml

The original manifest.yml will not be modified, so you don’t need to worry about updating the version number before building a new version of your package. You will still need to bump the version number of your .rhp/.gha, but this will help to keep the version number of your assemblies in sync with the packaging process without having to update it in two different places.

To test this out, please download the latest Rhino 7 WIP and try creating a Grasshopper or Rhino plug-in package. The $version placeholder is available in Yak v0.9.1 and above (check with yak version).

For more info, see the developer docs for Rhino 7 WIP.

1 Like