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


$version placeholder

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 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.