Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
6bcb769fe5 | |||
90110a653c | |||
3c561cc413 | |||
73f9622ba2 | |||
cf198ff781 | |||
648fc56495 | |||
ea6dc6b983 | |||
c0e8d09ce1 | |||
a471784cf3 | |||
1d2a4bf484 | |||
3fa620f3bc | |||
35f186b532 | |||
5cf35fd70a | |||
1eef08eaeb | |||
1750f28a9f | |||
41edbc5e22 | |||
04257f75e7 | |||
5fb602f733 | |||
94f0bdcce9 | |||
0ba24f9a3a |
@ -12,7 +12,7 @@
|
||||
@if (_upgradeavailable)
|
||||
{
|
||||
<ModuleMessage Type="MessageType.Info" Message="Select The Upgrade Button To Install a New Framework Version"></ModuleMessage>
|
||||
@("Framework") @_package.Version <button type="button" class="btn btn-success" @onclick=@(async () => await Download(Constants.PackageId, Constants.Version))>Upgrade</button>
|
||||
<button type="button" class="btn btn-success" @onclick=@(async () => await Download(Constants.PackageId, @_package.Version))>Upgrade To @_package.Version</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -26,7 +26,7 @@
|
||||
<Label HelpText="Upload a framework package and select Install to complete the installation">Framework: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<FileManager Filter="nupkg" Folder="Framework" />
|
||||
<FileManager Filter="nupkg" ShowFiles="false" Folder="Framework" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -63,7 +63,7 @@
|
||||
<span id="@_progressinfoid"></span><progress id="@_progressbarid" style="width: 150px; visibility: hidden;"></progress>
|
||||
<span class="float-right">
|
||||
<button type="button" class="btn btn-success" @onclick="UploadFile">Upload</button>
|
||||
@if (_showfiles && GetFileId() != -1)
|
||||
@if (ShowFiles && GetFileId() != -1)
|
||||
{
|
||||
<button type="button" class="btn btn-danger" @onclick="DeleteFile">Delete</button>
|
||||
}
|
||||
@ -86,7 +86,6 @@
|
||||
private string _id;
|
||||
private List<Folder> _folders;
|
||||
private List<File> _files = new List<File>();
|
||||
private bool _showfiles = true;
|
||||
private string _fileinputid = string.Empty;
|
||||
private string _progressinfoid = string.Empty;
|
||||
private string _progressbarid = string.Empty;
|
||||
|
@ -6,7 +6,7 @@
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<RazorLangVersion>3.0</RazorLangVersion>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<Version>1.0.2</Version>
|
||||
<Version>1.0.3</Version>
|
||||
<Product>Oqtane</Product>
|
||||
<Authors>Shaun Walker</Authors>
|
||||
<Company>.NET Foundation</Company>
|
||||
@ -15,7 +15,7 @@
|
||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/oqtane</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.2</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.3</PackageReleaseNotes>
|
||||
<RootNamespace>Oqtane</RootNamespace>
|
||||
<IsPackable>true</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Oqtane.Client</id>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
<authors>Shaun Walker</authors>
|
||||
<owners>.NET Foundation</owners>
|
||||
<title>Oqtane Framework</title>
|
||||
@ -13,7 +13,7 @@
|
||||
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||
<iconUrl>https://www.oqtane.org/Portals/0/icon.jpg</iconUrl>
|
||||
<tags>oqtane</tags>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.2</releaseNotes>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.3</releaseNotes>
|
||||
<summary>A modular application framework for Blazor</summary>
|
||||
</metadata>
|
||||
<files>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Oqtane.Framework</id>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
<authors>Shaun Walker</authors>
|
||||
<owners>.NET Foundation</owners>
|
||||
<title>Oqtane Framework</title>
|
||||
@ -13,16 +13,11 @@
|
||||
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||
<iconUrl>https://www.oqtane.org/Portals/0/icon.jpg</iconUrl>
|
||||
<tags>oqtane framework</tags>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.2</releaseNotes>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.3</releaseNotes>
|
||||
<summary>A modular application framework for Blazor</summary>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\Oqtane.Client\bin\Release\netstandard2.1\Oqtane.Client.dll" target="lib\netcoreapp3.1" />
|
||||
<file src="..\Oqtane.Client\bin\Release\netstandard2.1\Oqtane.Client.pdb" target="lib\netcoreapp3.1" />
|
||||
<file src="..\Oqtane.Server\bin\Release\netcoreapp3.1\Oqtane.Server.dll" target="lib\netcoreapp3.1" />
|
||||
<file src="..\Oqtane.Server\bin\Release\netcoreapp3.1\Oqtane.Server.pdb" target="lib\netcoreapp3.1" />
|
||||
<file src="..\Oqtane.Shared\bin\Release\netstandard2.1\Oqtane.Shared.dll" target="lib\netcoreapp3.1" />
|
||||
<file src="..\Oqtane.Shared\bin\Release\netstandard2.1\Oqtane.Shared.pdb" target="lib\netcoreapp3.1" />
|
||||
<file src="..\Oqtane.Server\wwwroot\**\*.*" target="wwwroot" />
|
||||
<file src="..\Oqtane.Server\bin\Release\netcoreapp3.1\publish\*.*" target="lib\netcoreapp3.1" />
|
||||
<file src="..\Oqtane.Server\bin\Release\netcoreapp3.1\publish\wwwroot\**\*.*" target="wwwroot" />
|
||||
</files>
|
||||
</package>
|
@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Oqtane.Server</id>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
<authors>Shaun Walker</authors>
|
||||
<owners>.NET Foundation</owners>
|
||||
<title>Oqtane Framework</title>
|
||||
@ -13,7 +13,7 @@
|
||||
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||
<iconUrl>https://www.oqtane.org/Portals/0/icon.jpg</iconUrl>
|
||||
<tags>oqtane</tags>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.2</releaseNotes>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.3</releaseNotes>
|
||||
<summary>A modular application framework for Blazor</summary>
|
||||
</metadata>
|
||||
<files>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>Oqtane.Shared</id>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
<authors>Shaun Walker</authors>
|
||||
<owners>.NET Foundation</owners>
|
||||
<title>Oqtane Framework</title>
|
||||
@ -13,7 +13,7 @@
|
||||
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||
<iconUrl>https://www.oqtane.org/Portals/0/icon.jpg</iconUrl>
|
||||
<tags>oqtane</tags>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.2</releaseNotes>
|
||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.3</releaseNotes>
|
||||
<summary>A modular application framework for Blazor</summary>
|
||||
</metadata>
|
||||
<files>
|
||||
|
1
Oqtane.Package/install.ps1
Normal file
1
Oqtane.Package/install.ps1
Normal file
@ -0,0 +1 @@
|
||||
Compress-Archive -Path "..\Oqtane.Server\bin\Release\netcoreapp3.1\publish\*" -DestinationPath "..\Oqtane.Server\bin\Release\Oqtane.Framework.1.0.3.Install.zip" -Force
|
Binary file not shown.
@ -1,7 +1,18 @@
|
||||
DEL "*.nupkg"
|
||||
del "*.nupkg"
|
||||
dotnet clean -c Release ..\Oqtane.sln
|
||||
dotnet build -c Release ..\Oqtane.sln
|
||||
nuget.exe pack Oqtane.Framework.nuspec
|
||||
nuget.exe pack Oqtane.Client.nuspec
|
||||
nuget.exe pack Oqtane.Server.nuspec
|
||||
nuget.exe pack Oqtane.Shared.nuspec
|
||||
del /F/Q/S "..\Oqtane.Server\bin\Release\netcoreapp3.1\publish" > NUL
|
||||
rmdir /Q/S "..\Oqtane.Server\bin\Release\netcoreapp3.1\publish"
|
||||
dotnet publish ..\Oqtane.Server\Oqtane.Server.csproj /p:Configuration=Release
|
||||
del "..\Oqtane.Server\bin\Release\netcoreapp3.1\publish\appsettings.json"
|
||||
ren "..\Oqtane.Server\bin\Release\netcoreapp3.1\publish\appsettings.release.json" "appsettings.json"
|
||||
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ".\install.ps1"
|
||||
del "..\Oqtane.Server\bin\Release\netcoreapp3.1\publish\appsettings.json"
|
||||
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ".\upgrade.ps1"
|
||||
del "..\Oqtane.Server\bin\Release\netcoreapp3.1\publish\Oqtane.Upgrade.*"
|
||||
nuget.exe pack Oqtane.Framework.nuspec
|
||||
|
||||
|
||||
|
1
Oqtane.Package/upgrade.ps1
Normal file
1
Oqtane.Package/upgrade.ps1
Normal file
@ -0,0 +1 @@
|
||||
Compress-Archive -Path "..\Oqtane.Server\bin\Release\netcoreapp3.1\publish\*" -DestinationPath "..\Oqtane.Server\bin\Release\Oqtane.Framework.1.0.3.Upgrade.zip" -Force
|
@ -94,8 +94,8 @@ namespace Oqtane.Controllers
|
||||
[Authorize(Roles = Constants.HostRole)]
|
||||
public void InstallModules()
|
||||
{
|
||||
_installationManager.InstallPackages("Modules", true);
|
||||
_logger.Log(LogLevel.Information, this, LogFunction.Create, "Modules Installed");
|
||||
_installationManager.InstallPackages("Modules", true);
|
||||
}
|
||||
|
||||
// DELETE api/<controller>/5?siteid=x
|
||||
|
@ -43,8 +43,8 @@ namespace Oqtane.Controllers
|
||||
[Authorize(Roles = Constants.HostRole)]
|
||||
public void InstallThemes()
|
||||
{
|
||||
_installationManager.InstallPackages("Themes", true);
|
||||
_logger.Log(LogLevel.Information, this, LogFunction.Create, "Themes Installed");
|
||||
_installationManager.InstallPackages("Themes", true);
|
||||
}
|
||||
|
||||
// DELETE api/<controller>/xxx
|
||||
|
@ -98,7 +98,7 @@ namespace Oqtane.Infrastructure
|
||||
ExtractFile(entry, filename);
|
||||
break;
|
||||
case "wwwroot":
|
||||
filename = Path.Combine(webRootPath, Utilities.PathCombine(entry.FullName.Replace($"wwwroot/", "").Split('/')));
|
||||
filename = Path.Combine(webRootPath.Replace(Path.DirectorySeparatorChar + "wwwroot", ""), Utilities.PathCombine(entry.FullName.Split('/')));
|
||||
ExtractFile(entry, filename);
|
||||
break;
|
||||
case "runtimes":
|
||||
@ -126,24 +126,14 @@ namespace Oqtane.Infrastructure
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(filename));
|
||||
}
|
||||
if (!FileInUse(filename) == false)
|
||||
|
||||
try
|
||||
{
|
||||
entry.ExtractToFile(filename, true);
|
||||
}
|
||||
}
|
||||
private static bool FileInUse(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (FileStream fs = new FileStream(path, FileMode.OpenOrCreate))
|
||||
{
|
||||
var flag = fs.CanWrite;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return true;
|
||||
// an error occurred extracting the file
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,12 +176,13 @@ namespace Oqtane.Infrastructure
|
||||
packageversion = node.InnerText;
|
||||
}
|
||||
reader.Close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ensure package version is higher than current framework version
|
||||
if (packageversion != "" && Version.Parse(Constants.Version).CompareTo(Version.Parse(packageversion)) < 0)
|
||||
// ensure package version is greater than or equal to current framework version
|
||||
if (packageversion != "" && Version.Parse(Constants.Version).CompareTo(Version.Parse(packageversion)) <= 0)
|
||||
{
|
||||
FinishUpgrade();
|
||||
}
|
||||
@ -202,28 +193,26 @@ namespace Oqtane.Infrastructure
|
||||
private void FinishUpgrade()
|
||||
{
|
||||
// check if upgrade application exists
|
||||
string Upgrader = "Oqtane.Upgrade.dll";
|
||||
string folder = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
|
||||
if (folder == null || !File.Exists(Path.Combine(folder, "Oqtane.Upgrade.exe"))) return;
|
||||
if (folder == null || !File.Exists(Path.Combine(folder, Upgrader))) return;
|
||||
|
||||
// run upgrade application
|
||||
var process = new Process
|
||||
using (var process = new Process())
|
||||
{
|
||||
StartInfo =
|
||||
process.StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = Path.Combine(folder, "Oqtane.Upgrade.exe"),
|
||||
Arguments = "\"" + _environment.ContentRootPath + "\" \"" + _environment.WebRootPath + "\"",
|
||||
ErrorDialog = false,
|
||||
WorkingDirectory = folder,
|
||||
FileName = "dotnet",
|
||||
Arguments = Path.Combine(folder, Upgrader) + " \"" + _environment.ContentRootPath + "\" \"" + _environment.WebRootPath + "\"",
|
||||
UseShellExecute = false,
|
||||
ErrorDialog = false,
|
||||
CreateNoWindow = true,
|
||||
RedirectStandardOutput = false,
|
||||
RedirectStandardError = false
|
||||
}
|
||||
};
|
||||
process.Start();
|
||||
};
|
||||
process.Start();
|
||||
process.Dispose();
|
||||
|
||||
// stop application so upgrade application can proceed
|
||||
RestartApplication();
|
||||
}
|
||||
|
||||
public void RestartApplication()
|
||||
|
@ -4,7 +4,7 @@
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<Version>1.0.2</Version>
|
||||
<Version>1.0.3</Version>
|
||||
<Product>Oqtane</Product>
|
||||
<Authors>Shaun Walker</Authors>
|
||||
<Company>.NET Foundation</Company>
|
||||
@ -13,7 +13,7 @@
|
||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/oqtane</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.2</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.3</PackageReleaseNotes>
|
||||
<RootNamespace>Oqtane</RootNamespace>
|
||||
<IsPackable>true</IsPackable>
|
||||
</PropertyGroup>
|
||||
@ -22,9 +22,6 @@
|
||||
<Content Remove="wwwroot\Modules\Templates\**" />
|
||||
<EmbeddedResource Remove="wwwroot\Modules\Templates\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Scripts\Tenant.01.00.02.01.sql" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Scripts\Master.00.00.00.00.sql" />
|
||||
<EmbeddedResource Include="Scripts\Master.00.09.00.00.sql" />
|
||||
@ -53,4 +50,14 @@
|
||||
<ProjectReference Include="..\Oqtane.Client\Oqtane.Client.csproj" />
|
||||
<ProjectReference Include="..\Oqtane.Shared\Oqtane.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<ItemGroup>
|
||||
<UpgradeFiles Include="$(ProjectDir)bin\Release\netcoreapp3.1\Oqtane.Upgrade.deps.json" />
|
||||
<UpgradeFiles Include="$(ProjectDir)bin\Release\netcoreapp3.1\Oqtane.Upgrade.dll" />
|
||||
<UpgradeFiles Include="$(ProjectDir)bin\Release\netcoreapp3.1\Oqtane.Upgrade.pdb" />
|
||||
<UpgradeFiles Include="$(ProjectDir)bin\Release\netcoreapp3.1\Oqtane.Upgrade.runtimeconfig.json" />
|
||||
<TemplateFiles Include="$(ProjectDir)wwwroot\Modules\Templates\**\*.*" />
|
||||
</ItemGroup>
|
||||
<Target Name="AddPayloadsFolder" AfterTargets="Publish">
|
||||
<Copy SourceFiles="@(UpgradeFiles)" DestinationFiles="@(UpgradeFiles->'$(PublishDir)%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="false" />
|
||||
<Copy SourceFiles="@(TemplateFiles)" DestinationFiles="@(TemplateFiles->'$(PublishDir)wwwroot\Modules\Templates\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="false" />
|
||||
</Target></Project>
|
||||
|
15
Oqtane.Server/appsettings.release.json
Normal file
15
Oqtane.Server/appsettings.release.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"Runtime": "Server",
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": ""
|
||||
},
|
||||
"Installation": {
|
||||
"DefaultAlias": "",
|
||||
"HostPassword": "",
|
||||
"HostEmail": "",
|
||||
"SiteTemplate": "",
|
||||
"DefaultTheme": "",
|
||||
"DefaultLayout": "",
|
||||
"DefaultContainer": ""
|
||||
}
|
||||
}
|
@ -25,8 +25,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Oqtane.Client" Version="1.0.2" />
|
||||
<PackageReference Include="Oqtane.Shared" Version="1.0.2" />
|
||||
<PackageReference Include="Oqtane.Client" Version="1.0.3" />
|
||||
<PackageReference Include="Oqtane.Shared" Version="1.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -31,7 +31,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Oqtane.Server" Version="1.0.2" />
|
||||
<PackageReference Include="Oqtane.Shared" Version="1.0.2" />
|
||||
<PackageReference Include="Oqtane.Server" Version="1.0.3" />
|
||||
<PackageReference Include="Oqtane.Shared" Version="1.0.3" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Oqtane.Shared" Version="1.0.2" />
|
||||
<PackageReference Include="Oqtane.Shared" Version="1.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -9,8 +9,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<br /><br /><h1 align="center">Please Wait... Upgrade In Progress....</h1>
|
||||
<img src="https://www.oqtane.org/Portals/0/oqtane-black.png" style="position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);" />
|
||||
<br /><br />
|
||||
<h1 align="center">Please Wait... Upgrade In Progress....</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -327,7 +327,7 @@ Oqtane.Interop = {
|
||||
|
||||
while (Chunk = FileChunk.shift()) {
|
||||
PartCount++;
|
||||
var FileName = file.name + ".part_" + PartCount + "_" + TotalParts;
|
||||
var FileName = file.name + ".part_" + PartCount.toString().padStart(3, '0') + "_" + TotalParts.toString().padStart(3, '0');
|
||||
|
||||
var data = new FormData();
|
||||
data.append('folder', folder);
|
||||
|
@ -4,7 +4,7 @@
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<Version>1.0.2</Version>
|
||||
<Version>1.0.3</Version>
|
||||
<Product>Oqtane</Product>
|
||||
<Authors>Shaun Walker</Authors>
|
||||
<Company>.NET Foundation</Company>
|
||||
@ -13,7 +13,7 @@
|
||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/oqtane</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.2</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.3</PackageReleaseNotes>
|
||||
<RootNamespace>Oqtane</RootNamespace>
|
||||
<IsPackable>true</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
@ -5,8 +5,8 @@ namespace Oqtane.Shared
|
||||
public class Constants
|
||||
{
|
||||
public const string PackageId = "Oqtane.Framework";
|
||||
public const string Version = "1.0.2";
|
||||
public const string ReleaseVersions = "0.9.0,0.9.1,0.9.2,1.0.0,1.0.1,1.0.2";
|
||||
public const string Version = "1.0.3";
|
||||
public const string ReleaseVersions = "0.9.0,0.9.1,0.9.2,1.0.0,1.0.1,1.0.2,1.0.3";
|
||||
|
||||
public const string PageComponent = "Oqtane.UI.ThemeBuilder, Oqtane.Client";
|
||||
public const string ContainerComponent = "Oqtane.UI.ContainerBuilder, Oqtane.Client";
|
||||
|
@ -4,7 +4,7 @@
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<Version>1.0.2</Version>
|
||||
<Version>1.0.3</Version>
|
||||
<Product>Oqtane</Product>
|
||||
<Authors>Shaun Walker</Authors>
|
||||
<Company>.NET Foundation</Company>
|
||||
@ -13,7 +13,7 @@
|
||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/oqtane</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.2</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.3</PackageReleaseNotes>
|
||||
<RootNamespace>Oqtane</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<OutputType>Exe</OutputType>
|
||||
<Version>1.0.2</Version>
|
||||
<Version>1.0.3</Version>
|
||||
<Product>Oqtane</Product>
|
||||
<Authors>Shaun Walker</Authors>
|
||||
<Company>.NET Foundation</Company>
|
||||
@ -13,7 +13,7 @@
|
||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/oqtane</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.2</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v1.0.3</PackageReleaseNotes>
|
||||
<RootNamespace>Oqtane</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
@ -11,12 +11,13 @@ namespace Oqtane.Upgrade
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// requires 2 arguments - the ContentRootPath and the WebRootPath of the site
|
||||
|
||||
// for testing purposes set Oqtane.Upgrade as startup project and modify values below
|
||||
//Array.Resize(ref args, 2);
|
||||
//args[0] = @"C:\yourpath\oqtane.framework\Oqtane.Server";
|
||||
//args[1] = @"C:\yourpath\oqtane.framework\Oqtane.Server\wwwroot";
|
||||
|
||||
// requires 2 arguments - the contentrootpath and the webrootpath of the site
|
||||
if (args.Length == 2)
|
||||
{
|
||||
string binfolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||
@ -47,14 +48,19 @@ namespace Oqtane.Upgrade
|
||||
{
|
||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||
{
|
||||
switch (Path.GetDirectoryName(entry.FullName).Split('\\')[0])
|
||||
string filename = Path.GetFileName(entry.FullName);
|
||||
if (!string.IsNullOrEmpty(filename))
|
||||
{
|
||||
case "lib":
|
||||
files.Add(Path.Combine(binfolder, Path.GetFileName(entry.FullName)));
|
||||
break;
|
||||
case "wwwroot":
|
||||
files.Add(Path.Combine(webrootfolder, entry.FullName.Replace("wwwroot/", "").Replace("/","\\")));
|
||||
break;
|
||||
// use top level folder to determine location to extract files
|
||||
switch (Path.GetDirectoryName(entry.FullName).Split(Path.DirectorySeparatorChar)[0])
|
||||
{
|
||||
case "lib":
|
||||
files.Add(Path.Combine(binfolder, filename));
|
||||
break;
|
||||
case "wwwroot":
|
||||
files.Add(Path.Combine(webrootfolder.Replace(Path.DirectorySeparatorChar + "wwwroot", ""), entry.FullName.Replace('/', Path.DirectorySeparatorChar)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -62,74 +68,100 @@ namespace Oqtane.Upgrade
|
||||
// ensure files are not locked
|
||||
if (CanAccessFiles(files))
|
||||
{
|
||||
// create backup
|
||||
foreach (string file in files)
|
||||
{
|
||||
if (File.Exists(file + ".bak"))
|
||||
{
|
||||
File.Delete(file + ".bak");
|
||||
}
|
||||
File.Move(file, file + ".bak");
|
||||
}
|
||||
|
||||
// extract files
|
||||
bool success = true;
|
||||
try
|
||||
{
|
||||
using (ZipArchive archive = ZipFile.OpenRead(packagename))
|
||||
{
|
||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||
{
|
||||
string filename = "";
|
||||
switch (Path.GetDirectoryName(entry.FullName).Split('\\')[0])
|
||||
{
|
||||
case "lib":
|
||||
filename = Path.Combine(binfolder, Path.GetFileName(entry.FullName));
|
||||
break;
|
||||
case "wwwroot":
|
||||
filename = Path.Combine(webrootfolder, entry.FullName.Replace("wwwroot/", "").Replace("/", "\\"));
|
||||
break;
|
||||
}
|
||||
if (files.Contains(filename))
|
||||
{
|
||||
entry.ExtractToFile(filename, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
// an error occurred extracting a file
|
||||
success = false;
|
||||
}
|
||||
|
||||
if (success)
|
||||
{
|
||||
// clean up backup
|
||||
foreach (string file in files)
|
||||
{
|
||||
if (File.Exists(file + ".bak"))
|
||||
{
|
||||
File.Delete(file + ".bak");
|
||||
}
|
||||
}
|
||||
|
||||
// delete package
|
||||
File.Delete(packagename);
|
||||
}
|
||||
else
|
||||
{
|
||||
// restore on failure
|
||||
// create backup
|
||||
foreach (string file in files)
|
||||
{
|
||||
if (File.Exists(file))
|
||||
{
|
||||
File.Delete(file);
|
||||
// remove previous backup if it exists
|
||||
if (File.Exists(file + ".bak"))
|
||||
{
|
||||
File.Delete(file + ".bak");
|
||||
}
|
||||
File.Move(file, file + ".bak");
|
||||
}
|
||||
}
|
||||
|
||||
// extract files
|
||||
bool success = true;
|
||||
try
|
||||
{
|
||||
using (ZipArchive archive = ZipFile.OpenRead(packagename))
|
||||
{
|
||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||
{
|
||||
string filename = Path.GetFileName(entry.FullName);
|
||||
if (!string.IsNullOrEmpty(filename))
|
||||
{
|
||||
// use top level folder to determine location to extract files
|
||||
switch (Path.GetDirectoryName(entry.FullName).Split(Path.DirectorySeparatorChar)[0])
|
||||
{
|
||||
case "lib":
|
||||
filename = Path.Combine(binfolder, filename);
|
||||
break;
|
||||
case "wwwroot":
|
||||
filename = Path.Combine(webrootfolder.Replace(Path.DirectorySeparatorChar + "wwwroot", ""), entry.FullName.Replace('/', Path.DirectorySeparatorChar));
|
||||
break;
|
||||
}
|
||||
if (files.Contains(filename))
|
||||
{
|
||||
if (!Directory.Exists(Path.GetDirectoryName(filename)))
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(filename));
|
||||
}
|
||||
entry.ExtractToFile(filename, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// an error occurred extracting a file
|
||||
success = false;
|
||||
Console.WriteLine("Update Not Successful: Error Extracting Files From Package - " + ex.Message);
|
||||
}
|
||||
|
||||
if (success)
|
||||
{
|
||||
// clean up backup
|
||||
foreach (string file in files)
|
||||
{
|
||||
if (File.Exists(file + ".bak"))
|
||||
{
|
||||
File.Delete(file + ".bak");
|
||||
}
|
||||
}
|
||||
|
||||
// delete package
|
||||
File.Delete(packagename);
|
||||
}
|
||||
else
|
||||
{
|
||||
// restore on failure
|
||||
foreach (string file in files)
|
||||
{
|
||||
if (File.Exists(file))
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
if (File.Exists(file + ".bak"))
|
||||
{
|
||||
File.Move(file + ".bak", file);
|
||||
}
|
||||
}
|
||||
File.Move(file + ".bak", file);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Update Not Successful: " + ex.Message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Upgrade Not Successful: Some Files Are Locked");
|
||||
}
|
||||
|
||||
// bring the app back online
|
||||
@ -138,7 +170,19 @@ namespace Oqtane.Upgrade
|
||||
File.Delete(Path.Combine(contentrootfolder, "app_offline.htm"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Framework Upgrade Package Not Found");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Framework Upgrade Folder " + deployfolder + " Does Not Exist");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Missing ContentRootPath and WebRootPath Parameters");
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,8 +202,15 @@ namespace Oqtane.Upgrade
|
||||
{
|
||||
try
|
||||
{
|
||||
stream = File.Open(filepath, FileMode.Open, FileAccess.Read, FileShare.None);
|
||||
locked = false;
|
||||
if (File.Exists(filepath))
|
||||
{
|
||||
stream = File.Open(filepath, FileMode.Open, FileAccess.Read, FileShare.None);
|
||||
locked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
locked = false;
|
||||
}
|
||||
}
|
||||
catch // file is locked by another process
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ Please note that this project is owned by the .NET Foundation and is governed by
|
||||
|
||||
- Install **[.NET Core 3.1 SDK (v3.1.300)](https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.300-windows-x64-installer)**.
|
||||
|
||||
- Install the Preview edition of [Visual Studio 2019](https://visualstudio.microsoft.com/vs/preview/) (version 16.6 or higher) with the **ASP.NET and web development** workload enabled. Oqtane works with all editions of Visual Studio from Community to Enterprise. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**.
|
||||
- Install the Preview edition of [Visual Studio 2019](https://visualstudio.microsoft.com/vs/preview/) (Community, Professional, and Enterprise Editions are all supported) with the **ASP.NET and web development** workload enabled. Oqtane works with all editions of Visual Studio from Community to Enterprise. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**.
|
||||
|
||||
- Download or Clone the Oqtane source code to your local system. Open the **Oqtane.sln** solution file and Build the solution.
|
||||
|
||||
|
Reference in New Issue
Block a user