From e2969545f3da3bd47626072a566b62fb9b89aee2 Mon Sep 17 00:00:00 2001 From: Sophie Brun Date: Wed, 14 Apr 2021 16:45:01 +0200 Subject: [PATCH] Update debian/watch --- debian/script-targz | 22 ++++++++++++++++++++++ debian/watch | 11 ++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100755 debian/script-targz diff --git a/debian/script-targz b/debian/script-targz new file mode 100755 index 0000000..708d5cc --- /dev/null +++ b/debian/script-targz @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +if [ "$1" = '--upstream-version' ]; then + new_version="$2" +else + printf "Missing --upstream-version argument" 1>&2 + exit 1 +fi + +DEB_SOURCE="$(dpkg-parsechangelog -SSource)" + +default_branch="$(git remote show https://github.com/aircrack-ng/rtl8188eus.git | grep 'HEAD' | sed 's/.*: v//')" + +version="$(echo ${new_version} | sed 's/~git.*//')" + +# fails if the upstream default branch has changed and is no longer the +# version mentioned in debian/watch +if [ "${default_branch}" != "${version}" ]; then + exit 1 +fi diff --git a/debian/watch b/debian/watch index 7b5b555..4728bc0 100644 --- a/debian/watch +++ b/debian/watch @@ -1,4 +1,9 @@ version=4 -opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%realtek-rtl8188eus-dkms-$1.tar.gz%" \ - https://github.com/aircrack-ng/rtl8188eus/tags \ - (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate +opts="mode=git, pretty=5.3.9~git%cd.%h, pgpmode=none" \ + https://github.com/aircrack-ng/rtl8188eus.git \ + HEAD debian debian/script-targz + +# Use the following when upstream starts to tag releases: +#opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%realtek-rtl8188eus-dkms-$1.tar.gz%" \ +# https://github.com/aircrack-ng/rtl8188eus/tags \ +# (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate