Skip to content

Commit

Permalink
Merge pull request #1 from Rookiestyle/simplify-plugin-migration
Browse files Browse the repository at this point in the history
Avoid double update for other plugins
  • Loading branch information
Rookiestyle authored May 22, 2020
2 parents bc3461f + 284a469 commit d525008
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/EarlyUpdateCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -788,14 +788,15 @@ private void UpdatePlugins(bool bUpdateTranslationsOnly)
private delegate string GetUpdateUrl(string baseurl, UpdateInfo upd, string language);
private string GetUpdateUrlSF(string baseurl, UpdateInfo upd, string language)
{
if (language == null)
return baseurl + "files/latest/download";
return baseurl + "files/Translations/" + language + "/download";
//Only convert Sourceforge url to Github url
//All new releases for plugins will be released on Github
baseurl = baseurl.Replace("https://sourceforge.net/projects/", "https://github.com/rookiestyle/");
return GetUpdateUrlGH(baseurl, upd, language);
}

private string GetUpdateUrlGH(string baseurl, UpdateInfo upd, string language)
{
if (language == null)
if (string.IsNullOrEmpty(language))
return baseurl + "releases/download/v" + upd.VersionAvailable.ToString() + "/" + upd.Name + ".plgx";
return baseurl.Replace("github.com", "raw.githubusercontent.com") + "master/Translations/" + language;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.0")]
[assembly: AssemblyFileVersion("2.0")]
[assembly: AssemblyVersion("2.0.1")]
[assembly: AssemblyFileVersion("2.0.1")]
[assembly: Guid("672570AF-CC57-4980-86F9-D48FD1CC707D")]
2 changes: 1 addition & 1 deletion version.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:
Early update check:2.0
Early update check:2.0.1
Early update check!de:3
Early update check!ru:2
:

0 comments on commit d525008

Please sign in to comment.