βŒˆβŒ‹ βŽ‡ branch:  freshcode


Artifact Content

Artifact b8d628406780a19c0a220e4e0ff9247a507cdd5f:

Wiki page [$version placeholder] by mario 2014-11-19 21:57:50.
D 2014-11-19T21:57:50.458
L $version\splaceholder
N text/x-markdown
P 77935e3e59f55bfd55177f5c06d827eae26cd396
U mario
W 1474
To eschew updating the download URL with every new release submission, one can simply use `$version` in any of the project links. It's automatically replaced with the current project version.

> **Download**  
>  `http://example.org/project/download/package-$VERSION.tar.xz`

Following syntaxes are permitted:

   * `$version`
   * `$Version`
   * `$VERSION`
   * `$version$`
   * `%version`
   * `%version%`

This can be used with *[Other URLs](wiki/Other+URLs)* as well. So by updating the project release / version number any other project link will pinpoint the right page:

     release-notes = http://example.org/NEWS-$version.txt

Also functions for the autoupdate-URL and within the regex/rules.

### Dot substitution

If you want to substitute the version number dots with something else, use this syntax instead:

   * `$_$version` = dots become underscores (`1.2.3` to `1_2_3`)
   * `$-$version` = dots become hyphen (`1.2.3` to `1-2-3`)
   * `$$version` = dots are stripped (`1.2.3` to `123`)

### Tuple access

A recent addition is extracting individual version number components.

   * `$version0` will Γ¬nterpolate the major `1` from `1.2.3`
   * `$version1` the minor `2` version component
   * and `$version2` the patch/fix release, here `3`

This component separation actually works on dots `.` hyphen `-` underscore `_` and tilde `~` to allow accessing suffixes (e.g. `rc2`) as `$version3` or `$version4` or whatever.

Z 928e3b3eead9a6e3896b6deb9c36c903