Update: Remove Plugin v1-v2 Migration
This commit is contained in:
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0503.2044")]
|
[assembly: AssemblyVersion("1.2.0506.1443")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0503.2044")]
|
[assembly: AssemblyFileVersion("1.2.0506.1443")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0503.2044")]
|
[assembly: AssemblyVersion("1.2.0506.1442")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0503.2044")]
|
[assembly: AssemblyFileVersion("1.2.0506.1442")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0503.2044")]
|
[assembly: AssemblyVersion("1.2.0506.1436")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0503.2044")]
|
[assembly: AssemblyFileVersion("1.2.0506.1436")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0503.2044")]
|
[assembly: AssemblyVersion("1.2.0506.1443")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0503.2044")]
|
[assembly: AssemblyFileVersion("1.2.0506.1443")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0503.2044")]
|
[assembly: AssemblyVersion("1.2.0506.1443")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0503.2044")]
|
[assembly: AssemblyFileVersion("1.2.0506.1443")]
|
||||||
@@ -101,8 +101,6 @@ namespace Disco.Services.Plugins
|
|||||||
DirectoryInfo pluginDirectoryRoot = new DirectoryInfo(pluginsLocation);
|
DirectoryInfo pluginDirectoryRoot = new DirectoryInfo(pluginsLocation);
|
||||||
if (pluginDirectoryRoot.Exists)
|
if (pluginDirectoryRoot.Exists)
|
||||||
{
|
{
|
||||||
MirgrateV1Plugins(pluginsLocation, pluginsStorageLocation);
|
|
||||||
|
|
||||||
foreach (DirectoryInfo pluginDirectory in pluginDirectoryRoot.EnumerateDirectories())
|
foreach (DirectoryInfo pluginDirectory in pluginDirectoryRoot.EnumerateDirectories())
|
||||||
{
|
{
|
||||||
string pluginManifestFilename = Path.Combine(pluginDirectory.FullName, "manifest.json");
|
string pluginManifestFilename = Path.Combine(pluginDirectory.FullName, "manifest.json");
|
||||||
@@ -135,105 +133,6 @@ namespace Disco.Services.Plugins
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void MirgrateV1Plugins(string pluginsLocation, string pluginsStorageLocation)
|
|
||||||
{
|
|
||||||
var migrationPackage = Path.Combine(HttpRuntime.BinDirectory, "Disco1.1-1.2PluginMigration.zip");
|
|
||||||
|
|
||||||
if (File.Exists(migrationPackage))
|
|
||||||
{
|
|
||||||
// eduSTAR.net
|
|
||||||
var eduSTARPluginPath = Path.Combine(pluginsLocation, "EduSTARnetCertificateProvider");
|
|
||||||
if (Directory.Exists(eduSTARPluginPath))
|
|
||||||
{
|
|
||||||
var eduSTARPluginAssemblyPath = Path.Combine(eduSTARPluginPath, "EduSTARnetCertificateProvider.dll");
|
|
||||||
if (File.Exists(eduSTARPluginAssemblyPath))
|
|
||||||
{
|
|
||||||
// Delete Old Plugin
|
|
||||||
Directory.Delete(eduSTARPluginPath, true);
|
|
||||||
|
|
||||||
// Add New Plugin
|
|
||||||
eduSTARPluginPath = Path.Combine(pluginsLocation, "eduSTARnet");
|
|
||||||
using (var migrationZipPackageStream = new FileStream(migrationPackage, FileMode.Open, FileAccess.Read, FileShare.Read))
|
|
||||||
{
|
|
||||||
using (ZipArchive migrationZipPackage = new ZipArchive(migrationZipPackageStream))
|
|
||||||
{
|
|
||||||
var pluginZipPackage = migrationZipPackage.Entries.Where(e => e.Name.Equals("eduSTARnet.discoPlugin", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
|
|
||||||
if (pluginZipPackage != null)
|
|
||||||
{
|
|
||||||
using (var pluginPackageStream = pluginZipPackage.Open())
|
|
||||||
{
|
|
||||||
using (ZipArchive pluginPackageArchive = new ZipArchive(pluginPackageStream))
|
|
||||||
{
|
|
||||||
foreach (var entry in pluginPackageArchive.Entries)
|
|
||||||
{
|
|
||||||
var entryPath = Path.Combine(eduSTARPluginPath, entry.FullName);
|
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(entryPath));
|
|
||||||
using (var entryOutput = new FileStream(entryPath, FileMode.Create, FileAccess.Write, FileShare.None))
|
|
||||||
{
|
|
||||||
using (var entryStream = entry.Open())
|
|
||||||
{
|
|
||||||
entryStream.CopyTo(entryOutput);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// LWT
|
|
||||||
var LWTPluginPath = Path.Combine(pluginsLocation, "LWTWarrantyProvider");
|
|
||||||
if (Directory.Exists(LWTPluginPath))
|
|
||||||
{
|
|
||||||
var LWTPluginAssemblyPath = Path.Combine(LWTPluginPath, "LWTWarrantyProvider.dll");
|
|
||||||
if (File.Exists(LWTPluginAssemblyPath))
|
|
||||||
{
|
|
||||||
// Delete Old Plugin
|
|
||||||
Directory.Delete(LWTPluginPath, true);
|
|
||||||
// Delete Plugin Storage
|
|
||||||
var LWTPluginStoragePath = Path.Combine(pluginsStorageLocation, "LWTWarrantyProvider");
|
|
||||||
if (Directory.Exists(LWTPluginStoragePath))
|
|
||||||
Directory.Delete(LWTPluginStoragePath, true);
|
|
||||||
|
|
||||||
// Add New Plugin
|
|
||||||
LWTPluginPath = Path.Combine(pluginsLocation, "LWTPlugin");
|
|
||||||
using (var migrationZipPackageStream = new FileStream(migrationPackage, FileMode.Open, FileAccess.Read, FileShare.Read))
|
|
||||||
{
|
|
||||||
using (ZipArchive migrationZipPackage = new ZipArchive(migrationZipPackageStream))
|
|
||||||
{
|
|
||||||
var pluginZipPackage = migrationZipPackage.Entries.Where(e => e.Name.Equals("LWTPlugin.discoPlugin", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
|
|
||||||
if (pluginZipPackage != null)
|
|
||||||
{
|
|
||||||
using (var pluginPackageStream = pluginZipPackage.Open())
|
|
||||||
{
|
|
||||||
using (ZipArchive pluginPackageArchive = new ZipArchive(pluginPackageStream))
|
|
||||||
{
|
|
||||||
foreach (var entry in pluginPackageArchive.Entries)
|
|
||||||
{
|
|
||||||
var entryPath = Path.Combine(LWTPluginPath, entry.FullName);
|
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(entryPath));
|
|
||||||
using (var entryOutput = new FileStream(entryPath, FileMode.Create, FileAccess.Write, FileShare.None))
|
|
||||||
{
|
|
||||||
using (var entryStream = entry.Open())
|
|
||||||
{
|
|
||||||
entryStream.CopyTo(entryOutput);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static void ExecuteTaskInternal(ScheduledTaskStatus Status, string pluginPackagesLocation, List<Tuple<PluginManifest, string, PluginLibraryItem>> UpdatePlugins)
|
internal static void ExecuteTaskInternal(ScheduledTaskStatus Status, string pluginPackagesLocation, List<Tuple<PluginManifest, string, PluginLibraryItem>> UpdatePlugins)
|
||||||
{
|
{
|
||||||
while (UpdatePlugins.Count > 0)
|
while (UpdatePlugins.Count > 0)
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0503.2044")]
|
[assembly: AssemblyVersion("1.2.0506.1443")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0503.2044")]
|
[assembly: AssemblyFileVersion("1.2.0506.1443")]
|
||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.0503.2044")]
|
[assembly: AssemblyVersion("1.2.0506.1443")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0503.2044")]
|
[assembly: AssemblyFileVersion("1.2.0506.1443")]
|
||||||
@@ -780,7 +780,6 @@
|
|||||||
<Generator>RazorGenerator</Generator>
|
<Generator>RazorGenerator</Generator>
|
||||||
<LastGenOutput>Install.generated.cs</LastGenOutput>
|
<LastGenOutput>Install.generated.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<Content Include="bin\Disco1.1-1.2PluginMigration.zip" />
|
|
||||||
<None Include="ClientSource\Scripts\Core.min.js.map">
|
<None Include="ClientSource\Scripts\Core.min.js.map">
|
||||||
<DependentUpon>Core.js.bundle</DependentUpon>
|
<DependentUpon>Core.js.bundle</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
@@ -1854,7 +1853,7 @@
|
|||||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||||
</WebProjectProperties>
|
</WebProjectProperties>
|
||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
<UserProperties BuildVersion_StartDate="2011/7/1" BuildVersion_BuildAction="Both" BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="False" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" />
|
<UserProperties BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.DeltaBaseYear.MonthAndDayStamp.TimeStamp" BuildVersion_DetectChanges="False" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildAction="Both" BuildVersion_StartDate="2011/7/1" />
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.2.0503.2044")]
|
[assembly: AssemblyVersion("1.2.0506.1443")]
|
||||||
[assembly: AssemblyFileVersion("1.2.0503.2044")]
|
[assembly: AssemblyFileVersion("1.2.0506.1443")]
|
||||||
Reference in New Issue
Block a user