[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

watch file for semantically versioned prerelease at Github



Hi,

I am trying to upgrade to the nice uscan v5 templating syntax for this
upstream project https://api.github.com/duesee/imap-codec where latest
tag is "imap-codec/v2.0.0-alpha.6".

Ideally I would declare "Archive: Github" in debian/upstream/metadata,
but that wrongly resolves some old non-prefixed tags, and apparently
there is no way to declare other fields than "Archive" as metadata.

Apparently the Github template supports only "top-level" tags like
"1.2.3" or "v1.2.3", i.e. has no option to restrict to some prefix
(would be lovely if I could say Archive-Tag-Prefix: "@PROJECT@/v").
Also, the new Version-Type SEMANTIC_VERSION apparently only restricts
matching, without using the knowledge about semantic versioning to also
transform pre-releases to use Debian ~ notation (see also bug#1112452).

All in all, I ended with this watch file (listing only the *body*
segment, omitting the "version: 5" header segment):

Template: Github
Owner: duesee
Project: imap-codec
Matching-Pattern: refs/tags/imap-codec/v@SEMANTIC_VERSION@
Uversion-Mangle: s/\d\K-([a-z]+)[.-]?(\d)?/~$1$2/

Unfortunately that fails to guess the compression type, and explicitly
adding "Compression: gz" does not help.

Has anyone found a way to use uscan v5 to match projects like this?

Asking here, because I am uncertain if I have found a bug, or am
expressing a wishlist request, or simply missing something.

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/
 * Sponsorship: https://ko-fi.com/drjones

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature


Reply to: