Skip to content

Commit

Permalink
Merge pull request #53 from rimrul/gnupg
Browse files Browse the repository at this point in the history
Handle GPG updates better
  • Loading branch information
dscho authored Nov 29, 2023
2 parents 268e3f5 + 2d99898 commit 7e9d912
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion GitForWindowsHelper/component-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ const guessComponentUpdateDetails = (title, body) => {
if (['git-lfs'].includes(package_name)) package_name = `mingw-w64-${package_name}`
else if (['git-credential-manager', 'gcm-core', 'gcm'].includes(package_name)) package_name = 'mingw-w64-git-credential-manager'
else if (package_name === 'cygwin') package_name = 'msys2-runtime'
else if (package_name === 'gpg') package_name = 'gnupg'

version = version
.replace(/^(GCM |openssl-|OpenSSL_|v|V_|GnuTLS |tig-|Heimdal |cygwin-|PCRE2-|Bash-|curl-)/, '')
.replace(/^(GCM |openssl-|OpenSSL_|v|V_|GnuTLS |tig-|Heimdal |cygwin-|PCRE2-|Bash-|curl-|gnupg-)/, '')
.replace(/\s+patch\s+/, '.')
.replace(/_/g, '.')
.replace(/-release$/, '')
Expand All @@ -26,6 +27,7 @@ const prettyPackageName = (name) => {
'msys2-runtime': 'MSYS2 runtime',
bash: 'Bash',
curl: 'cURL',
gnupg: 'GNU Privacy Guard',
gnutls: 'GNU TLS',
heimdal: 'Heimdal',
mintty: 'MinTTY',
Expand Down
3 changes: 2 additions & 1 deletion __tests__/component-updates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ test('guessComponentUpdateDetails()', () => {
['[New git-lfs version] v3.3.0', 'mingw-w64-git-lfs', '3.3.0'],
['[New heimdal version] Heimdal 7.7.1 - Security Fix Release', 'heimdal', '7.7.1'],
['[New gnutls version] GnuTLS 3.8.0', 'gnutls', '3.8.0'],
['[New git-credential-manager version] GCM 2.0.886', 'mingw-w64-git-credential-manager', '2.0.886']
['[New git-credential-manager version] GCM 2.0.886', 'mingw-w64-git-credential-manager', '2.0.886'],
['[New gpg version] gnupg-2.2.42', 'gnupg', '2.2.42']
]
for (const [title, package_name, version] of titles) {
expect(guessComponentUpdateDetails(title)).toEqual({ package_name, version })
Expand Down

0 comments on commit 7e9d912

Please sign in to comment.