Version: 5
# Since the official upstream download page at https://cfengine.com/product/community/
# is dynamically generated from many layers of JSON files, we instead look at the
# GitHub releases page to get a list of versions and then construct the URLs for
# release tarballs from them.
# Therefore, the following looks pretty ugly. If someone finds a sane way to improve it,
# please do so!
# only the release version devisible by 3 are LTS version.
# This is the reason for the long regex

Source: https://github.com/cfengine/core/tags
Matching-Pattern: .*/(\d+\.\d+\.\d+)@ARCHIVE_EXT@
#Matching-Pattern: .*/(\d+\.([0369]|[147][0369]*([147][0369]*[258][0369]*)*([147][0369]*[147]|[258])|[258][0369]*([258][0369]*[147][0369]*)*([258][0369]*[258]|[147]))+\.\d+)@ARCHIVE_EXT@
Downloadurlmangle: s%https://github.com/cfengine/core/archive/refs/tags/(@ANY_VERSION@@ARCHIVE_EXT@)%https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-community-$1%
Filenamemangle: s%.*/(@ANY_VERSION@)(@ARCHIVE_EXT@)%cfengine-$1$3%
Uversionmangle: s/(\d+\.\d+\.\d+).*/$1/

Component: masterfiles
Source: https://github.com/cfengine/masterfiles/tags
Matching-Pattern: .*/(\d+\.\d+\.\d+)@ARCHIVE_EXT@
#Matching-Pattern: .*/(\d+\.([0369]|[147][0369]*([147][0369]*[258][0369]*)*([147][0369]*[147]|[258])|[258][0369]*([258][0369]*[147][0369]*)*([258][0369]*[258]|[147]))+\.\d+)@ARCHIVE_EXT@
Downloadurlmangle: s%https://github.com/cfengine/masterfiles/archive/refs/tags/(@ANY_VERSION@@ARCHIVE_EXT@)%https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-$1%
Filenamemangle: s%.*/(@ANY_VERSION@)(@ARCHIVE_EXT@)%cfengine-masterfiles-$1$3%
Uversionmangle: s/(\d+\.\d+\.\d+).*/$1/
