switch to github API to get more tags
authormirabilos <tg@debian.org>
Sun, 31 Jan 2021 18:12:21 +0000 (19:12 +0100)
committermirabilos <mirabilos@evolvis.org>
Sun, 31 Jan 2021 18:12:21 +0000 (19:12 +0100)
debian/repack
debian/watch

index 1e2026d..7c62de0 100755 (executable)
@@ -12,8 +12,7 @@ if [[ ! -e $watchfile ]]; then
   printf >&2 '%s: Error! File %s not found.\n' "$0" "$watchfile"
   exit 1
 fi
   printf >&2 '%s: Error! File %s not found.\n' "$0" "$watchfile"
   exit 1
 fi
-apipath=$(grep -o '\<https://github\.com/[!-~]*/tags\>' "$watchfile" | \
-    sed 's!github\.com!api.github.com/repos!')
+apipath=$(grep -o '\<https://api.github.com/[^ \n]*' "$watchfile")
 if [[ -z $apipath ]]; then
   printf >&2 '%s: Error! github.com repository not found in %s!\n' "$0" "$watchfile"
   exit 1
 if [[ -z $apipath ]]; then
   printf >&2 '%s: Error! github.com repository not found in %s!\n' "$0" "$watchfile"
   exit 1
@@ -83,7 +82,7 @@ rm -rf "$tempdir"
 mkdir "$tempdir"
 tar -xaf "$tarball" -C "$tempdir"
 cd "$tempdir"
 mkdir "$tempdir"
 tar -xaf "$tarball" -C "$tempdir"
 cd "$tempdir"
-mv MuseScore-* "musescore2-$debversion.orig"
+mv *use*ore* "musescore2-$debversion.orig"
 cd "musescore2-$debversion.orig"
 
 # 2) Check for DSFG compliance (no precompiled binaries or PDFs, etc).
 cd "musescore2-$debversion.orig"
 
 # 2) Check for DSFG compliance (no precompiled binaries or PDFs, etc).
index 29ab550..bbc5e07 100644 (file)
@@ -1,11 +1,15 @@
 # debian/watch - check for a new upstream release and fetch it. See USCAN(1).
 # The script 'debian/repack' is called to perform changes for DFSG compliance.
 # debian/watch - check for a new upstream release and fetch it. See USCAN(1).
 # The script 'debian/repack' is called to perform changes for DFSG compliance.
+# Since repacking is used, do not add --rename when invoking uscan, please.
 version=4
 opts=\
 uversionmangle=s/%25/~/,\
 dversionmangle=s/\+dfsg\d*$//,\
 version=4
 opts=\
 uversionmangle=s/%25/~/,\
 dversionmangle=s/\+dfsg\d*$//,\
+repack,\
 repacksuffix=+dfsg4,\
 compression=gz,\
 repacksuffix=+dfsg4,\
 compression=gz,\
-filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/MuseScore-$1\.tar\.gz/ \
-  https://github.com/musescore/MuseScore/tags .*/v?(2.[0-9](?:[0-9.]*(?:%25pre)?[0-9]+)?)\.tar\.gz \
+searchmode=plain,\
+filenamemangle=s/.+\/v?([0-9]+\.[0-9](?:[0-9.]*(?:%25pre)?[0-9]+)?)/MuseScore-$1.tar.gz/ \
+  https://api.github.com/repos/musescore/MuseScore/tags?per_page=200 \
+  https:[^"]*/tarball/v?(2\.[0-9](?:[0-9.]*(?:%25pre)?[0-9]+)?)(?="|$) \
 debian debian/repack
 debian debian/repack