Skip to content

Commit 3368422

Browse files
committed
Improve updates of other plugins
Allow downloading plugins with build version being 0 - e.g. someplugin-1.2.0.plgs Add Readable Passphrase Plugin to external plugins that can be updated Closes #68
1 parent 5eedd6c commit 3368422

4 files changed

Lines changed: 17 additions & 7 deletions

File tree

ExternalPluginUpdates/ExternalPluginUpdates.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ can use ExternalPluginUpdatesUser.xml to remove certain plugins
1010
from one-click update
1111
-->
1212
<UpdateInfoExternList>
13-
<Version>20</Version>
13+
<Version>21</Version>
1414
<UpdateInfoExtern>
1515
<PluginName>WebAutoType</PluginName>
1616
<PluginURL>https://sourceforge.net/projects/webautotype/</PluginURL>
@@ -329,4 +329,11 @@ from one-click update
329329
<UpdateMode>ZipExtractAll</UpdateMode>
330330
<AllowVersionStripping>True</AllowVersionStripping>
331331
</UpdateInfoExtern>
332+
<UpdateInfoExtern>
333+
<PluginName>Readable Passphrase Plugin</PluginName>
334+
<PluginURL>https://github.com/ligos/readablepassphrasegenerator</PluginURL>
335+
<PluginUpdateURL>https://github.com/ligos/readablepassphrasegenerator/releases/download/release-{major}.{minor}.{build}/ReadablePassphrase.{major}.{minor}.{build}.plgx</PluginUpdateURL>
336+
<UpdateMode>PlgxDirect</UpdateMode>
337+
<AllowVersionStripping>False</AllowVersionStripping>
338+
</UpdateInfoExtern>
332339
</UpdateInfoExternList>

src/PluginUpdateInfo.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,10 @@ protected virtual string MergeInVersion(bool bUseAvailableVersion)
479479
if (bStripping) sResult = r.Replace(sResult, string.Empty);
480480
else
481481
{
482-
sResult = r.Replace(sResult, "$1\n" + v.Build.ToString());
482+
if (v.Build >= 0)
483+
sResult = r.Replace(sResult, "$1\n" + v.Build.ToString());
484+
else
485+
sResult = r.Replace(sResult, "$1\n0");
483486
//Special handling for plugins that ALWAYS include the build
484487
r = new Regex(@"\{([^}]*)BUILD!\}", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
485488
sResult = r.Replace(sResult, "$1\n0");

src/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[assembly: AssemblyConfiguration("")]
1515
[assembly: AssemblyCompany("rookiestyle")]
1616
[assembly: AssemblyProduct("KeePass Plugin")]
17-
[assembly: AssemblyCopyright("Copyright 2021-2024")]
17+
[assembly: AssemblyCopyright("Copyright 2021-2025")]
1818
[assembly: AssemblyTrademark("")]
1919
[assembly: AssemblyCulture("")]
2020
// This sets the default COM visibility of types in the assembly to invisible.
@@ -26,6 +26,6 @@
2626
//
2727
// You can specify all the values or you can use the default the Revision and
2828
// Build Numbers by using the '*' as shown below:
29-
[assembly: AssemblyVersion("4.2.3")]
30-
[assembly: AssemblyFileVersion("4.2.3")]
29+
[assembly: AssemblyVersion("4.2.4")]
30+
[assembly: AssemblyFileVersion("4.2.4")]
3131
[assembly: Guid("672570AF-CC57-4980-86F9-D48FD1CC707D")]

version.info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
:
2-
Early update check:4.2.3
2+
Early update check:4.2.4
33
Early update check!de:9
44
Early update check!ru:2
55
Early update check!fr:1
66
Early update check!pt:3
77
Early update check!it:1
88
Early update check!zh:2
99
Early update check!ja:1
10-
ExternalPluginUpdates:20
10+
ExternalPluginUpdates:21
1111
:

0 commit comments

Comments
 (0)