version=3

# Here, there are 2 options (uversionmangle and
# filenamemangle) separated by a comma (warning no space
# unless to put the option and its value in double quotes).
#
#
# https://github.com/pfautrero/xia/tags
#     is the "releases" page, ie it's the page where the releases
#     are downloadable via simple links (ie some `<a href="link-location...">`
#     in the html source code).
#
# ^.*/archive/(.*)\.tar\.gz$
#     is the regex to catch the link locations (href) which are
#     releases links in the page https://github.com/pfautrero/xia/tags.
#     In this regex, the captured group number 1 is the version delimiter.
#
# The goal of the "uversionmangle" option
#     is to change a version from 2.0-beta1 to 2.0~beta1
#     (for instance) in the "releases" page. Because with
#     git, the "~" character in not allowed in a tag but the
#     correct syntax for Debian is 2.0~beta1.
#
# The goal of the "filenamemangle" option
#     is to have automatically a .tar.gz file called archive.tar.gz.
#
opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/,\
filenamemangle=s/^(.*)\.tar\.gz$/archive.tar.gz/ \
    https://github.com/pfautrero/xia/tags ^.*/archive/(.*)\.tar\.gz$


