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


Update of "$version placeholder"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: b8d628406780a19c0a220e4e0ff9247a507cdd5f
Page Name:$version placeholder
Date: 2014-11-19 21:57:50
Original User: mario
Mimetype:text/x-markdown
Parent: 77935e3e59f55bfd55177f5c06d827eae26cd396
Content

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.