Add try and update path + version in publish profile
This commit is contained in:
parent
c9269aaf3a
commit
69e86bfa26
@ -303,7 +303,7 @@ namespace ManagerService.Controllers
|
||||
#if RELEASE
|
||||
Console.WriteLine($"currentDirectory: {Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}");
|
||||
//currentDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "service-data");
|
||||
currentDirectory = Path.Combine("home", "debian", "service-data");
|
||||
currentDirectory = Path.Combine("/home", "debian", "service-data");
|
||||
System.IO.Directory.CreateDirectory(currentDirectory.ToString());
|
||||
#endif
|
||||
|
||||
@ -540,14 +540,23 @@ namespace ManagerService.Controllers
|
||||
|
||||
private void createFile(String fileName, byte[] fileBytes)
|
||||
{
|
||||
using (FileStream fs = System.IO.File.Create(fileName))
|
||||
try
|
||||
{
|
||||
Console.WriteLine($"Try to create file at : {fileName}");
|
||||
using (FileStream fs = System.IO.File.Create(fileName))
|
||||
{
|
||||
|
||||
// Add some information to the file.
|
||||
fs.Write(fileBytes, 0, fileBytes.Length);
|
||||
Console.WriteLine($"Try to create file at : {fileName}");
|
||||
|
||||
Console.WriteLine($"Created file: {fileName}");
|
||||
// Add some information to the file.
|
||||
fs.Write(fileBytes, 0, fileBytes.Length);
|
||||
|
||||
Console.WriteLine($"Created file: {fileName}");
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"An error occured during file creation: {fileName} - {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
|
||||
<DockerPublish>true</DockerPublish>
|
||||
<RegistryUrl>https://registry.unov.be</RegistryUrl>
|
||||
<UserName>admin</UserName>
|
||||
<PublishImageTag>latest</PublishImageTag>
|
||||
<PublishImageTag>version_1_0</PublishImageTag>
|
||||
<PublishProvider>ContainerRegistry</PublishProvider>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user