Skip to content

Commit 8061e70

Browse files
committed
Fix /add relnote for PCRE2 issues
I tried running `/add relnote` for the most recent PCRE2 issue in git-for-windows/git#5398 (comment) but it failed: The following deployment(s) are missing: * https://wingit.blob.core.windows.net/i686/pcre2-pcre2-10.45-1-i686.pkg.tar.xz * https://wingit.blob.core.windows.net/x86-64/pcre2-pcre2-10.45-1-x86_64.pkg.tar.xz * https://wingit.blob.core.windows.net/i686/mingw-w64-i686-pcre2-pcre2-10.45-1-any.pkg.tar.xz * https://wingit.blob.core.windows.net/x86-64/mingw-w64-x86_64-pcre2-pcre2-10.45-1-any.pkg.tar.xz Clearly, GitForWindowsHelper was parsing the version incorrectly. Let's fix that. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 1300a1b commit 8061e70

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

GitForWindowsHelper/component-updates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const guessComponentUpdateDetails = (title, body) => {
1414
else if (['clang', 'llvm', 'mingw-w64-clang'].includes(package_name)) package_name = 'mingw-w64-llvm'
1515

1616
version = version
17-
.replace(/^(GCM |openssl-|OpenSSL_|v|V_|GnuTLS |tig-|Heimdal |cygwin-|PCRE2-|Bash-|curl-|gnupg-|is-)/, '')
17+
.replace(/^(GCM |openssl-|OpenSSL_|v|V_|GnuTLS |tig-|Heimdal |cygwin-|PCRE2-|Bash-|curl-|gnupg-|is-|pcre2-)/, '')
1818
.replace(/\s+patch\s+/, '.')
1919
.replace(/_/g, '.')
2020
.replace(/-release$/, '')

__tests__/component-updates.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,16 @@ http://www.gnutls.org/news.html#2023-02-10`
211211
package: 'msys2-runtime',
212212
version: '3.4.7'
213213
})
214+
expect(await guessReleaseNotes(context, {
215+
labels: [{ name: 'component-update' }],
216+
title: '[New pcre2 version] pcre2-10.45',
217+
body: `\n\nhttps://github.com/PCRE2Project/pcre2/releases/tag/pcre2-10.45`
218+
})).toEqual({
219+
type: 'feature',
220+
message: 'Comes with [PCRE2 v10.45](https://github.com/PCRE2Project/pcre2/releases/tag/pcre2-10.45).',
221+
package: 'pcre2',
222+
version: '10.45'
223+
})
214224
})
215225

216226
test('getMissingDeployments()', async () => {

0 commit comments

Comments
 (0)