Skip to content

Commit 65d8908

Browse files
committed
Merge branch 'release/0.0.3'
2 parents c257ae4 + 014dae4 commit 65d8908

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

src/CommandHandlers.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ await Execute(async (cancellationToken, cancellationEvent) =>
4949

5050
progressReport.Finish();
5151

52-
if (dbSchemaFile.Exists)
52+
if (dbSchemaFile.Exists)
5353
{
5454
progressReport.Start("Merge and update database schema file");
5555

@@ -83,7 +83,7 @@ public static async Task BuildJsonAndMkDocs(DatabaseEngine dbEngine, string dbCo
8383
await Execute(async (cancellationToken, cancellationEvent) =>
8484
{
8585
var progressReport = ProgressReportFactory.CreateProgressReport(ProgressUnit.Count);
86-
var catalog = new Catalog("SqlDocs", "./L11n", new CultureInfo(language));
86+
var catalog = new Catalog("SqlDocs", Path.Combine(GetAppFolder(), "./L11n"), new CultureInfo(language));
8787
try
8888
{
8989
progressReport.Start("Generate database schema");
@@ -137,7 +137,7 @@ public static async Task BuildMkDocs(DatabaseEngine dbEngine, FileInfo dbSchemaF
137137
await Execute(async (cancellationToken, cancellationEvent) =>
138138
{
139139
var progressReport = ProgressReportFactory.CreateProgressReport(ProgressUnit.Count);
140-
var catalog = new Catalog("SqlDocs", "./L11n", new CultureInfo(language));
140+
var catalog = new Catalog("SqlDocs", Path.Combine(GetAppFolder(), "./L11n"), new CultureInfo(language));
141141
try
142142
{
143143
progressReport.Start("Load database schema file");
@@ -200,5 +200,14 @@ private static async Task Execute(Func<CancellationToken, EventWaitHandle, Task>
200200
Console.WriteLine();
201201
Console.WriteLine($"Time elapsed: {stopwatch.Elapsed}.");
202202
}
203+
204+
private static string GetAppFolder()
205+
{
206+
// Get the full location of the assembly
207+
string assemblyLocation = Environment.ProcessPath;
208+
209+
// Get the folder that's in
210+
return Path.GetDirectoryName(assemblyLocation);
211+
}
203212
}
204213
}

src/SqlDocs.App.csproj

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@
1313
<Description>Building nice looking documention of relational database schemata</Description>
1414
</PropertyGroup>
1515

16-
<PropertyGroup Condition="'$(Configuration)|$(RuntimeIdentifier)'=='Release|win-x86'">
17-
<PublishSingleFile>true</PublishSingleFile>
18-
</PropertyGroup>
19-
<PropertyGroup Condition="'$(Configuration)|$(RuntimeIdentifier)'=='Release|win-x64'">
20-
<PublishSingleFile>true</PublishSingleFile>
21-
</PropertyGroup>
22-
<PropertyGroup Condition="'$(Configuration)|$(RuntimeIdentifier)'=='Release|win-arm64'">
23-
<PublishSingleFile>true</PublishSingleFile>
24-
</PropertyGroup>
25-
2616
<ItemGroup>
2717
<PackageReference Include="Enbrea.MdBuilder" Version="0.0.2" />
2818
<PackageReference Include="Enbrea.Progress" Version="0.0.4" />

0 commit comments

Comments
 (0)