When building a Google Cloud SDK snap, we fetch an upstream tarball using the copy plugin. The URL that we fetch from contains the version number. To make updating to new versions quicker (and less error-prone), it would be nice if we could use the version as a variable in the URL.
--- CURRENT ---
version: 112.0.0
...
parts:
google-cloud-sdk:
plugin: copy
source: https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-112.0.0-linux-x86_64.tar.gz
--- IDEAL ---
version: 112.0.0
...
parts:
google-cloud-sdk:
plugin: copy
source: https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-{version}-linux-x86_64.tar.gz
(Or $version or ... etc.)
Perhaps this can be more generally phrased as variable support, as I imagine having something beyond just the version be rather useful. For example, what if you want to use `112.0.0ubuntu1` (or similar) as your version instead of just the straight upstream version? In that case having `112.0.0` in another variable that can be used by both the version and source keys would be useful.