From a4de79d970d61c09d5fc5199f29b8bb6ca0a966f Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Thu, 26 Mar 2020 18:58:33 +0100 Subject: [PATCH] main: fix regex --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 7e2746e..ce79b50 100644 --- a/main.js +++ b/main.js @@ -32,7 +32,7 @@ async function main() { const file = path.join(sourceDirectory, "debian/changelog") const changelog = await firstline(file) - const regex = /^(?.+) \((?[0-9]+)?:?(?[^:-]+)-?(?[^:-]+)?\) (?.+);/ + const regex = /^(?.+) \(((?[0-9]+):)?(?[^:-]+)(-(?[^:-]+))?\) (?.+);/ const match = changelog.match(regex) const { package, epoch, version, revision, distribution } = match.groups const os = await getOS(getDistribution(distribution))