Skip to content

Commit f6412ad

Browse files
committed
Merge branch 'release/0.0.4'
2 parents 65d8908 + 1c268e8 commit f6412ad

File tree

10 files changed

+67
-74
lines changed

10 files changed

+67
-74
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Introduction
66

7-
SQLDocs is a cross-platform console application build with [.NET 7](https://dotnet.microsoft.com/) to create nice looking [MkDocs](https://www.mkdocs.org/) schema documentations for relational databases. Currently the following database systems are supported:
7+
SQLDocs is a cross-platform console application build with [.NET 8](https://dotnet.microsoft.com/) to create nice looking [MkDocs](https://www.mkdocs.org/) schema documentations for relational databases. Currently the following database systems are supported:
88

99
+ [Firebird](https://firebirdsql.org/)
1010
+ [PostgreSQL](https://www.postgresql.org/)

SqlDocs.sln

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,9 @@ Global
3636
{09080314-F527-44FF-8F41-664AFE9D76AF}.Release|x86.ActiveCfg = Release|Any CPU
3737
{09080314-F527-44FF-8F41-664AFE9D76AF}.Release|x86.Build.0 = Release|Any CPU
3838
{3F276369-D5AB-4935-969A-926AF748FE37}.Debug|Any CPU.ActiveCfg = Debug|x64
39-
{3F276369-D5AB-4935-969A-926AF748FE37}.Debug|Any CPU.Build.0 = Debug|x64
4039
{3F276369-D5AB-4935-969A-926AF748FE37}.Debug|ARM64.ActiveCfg = Debug|ARM64
41-
{3F276369-D5AB-4935-969A-926AF748FE37}.Debug|ARM64.Build.0 = Debug|ARM64
42-
{3F276369-D5AB-4935-969A-926AF748FE37}.Debug|x64.ActiveCfg = Debug|x64
43-
{3F276369-D5AB-4935-969A-926AF748FE37}.Debug|x64.Build.0 = Debug|x64
40+
{3F276369-D5AB-4935-969A-926AF748FE37}.Debug|x64.ActiveCfg = Debug|ARM64
4441
{3F276369-D5AB-4935-969A-926AF748FE37}.Debug|x86.ActiveCfg = Debug|x86
45-
{3F276369-D5AB-4935-969A-926AF748FE37}.Debug|x86.Build.0 = Debug|x86
4642
{3F276369-D5AB-4935-969A-926AF748FE37}.Release|Any CPU.ActiveCfg = Release|x64
4743
{3F276369-D5AB-4935-969A-926AF748FE37}.Release|Any CPU.Build.0 = Release|x64
4844
{3F276369-D5AB-4935-969A-926AF748FE37}.Release|ARM64.ActiveCfg = Release|ARM64
@@ -56,7 +52,7 @@ Global
5652
HideSolutionNode = FALSE
5753
EndGlobalSection
5854
GlobalSection(ExtensibilityGlobals) = postSolution
59-
RESX_NeutralResourcesLanguage = en-GB
6055
SolutionGuid = {B146D1D5-6426-4AA3-A11B-144ACD4C0740}
56+
RESX_NeutralResourcesLanguage = en-GB
6157
EndGlobalSection
6258
EndGlobal

azure-pipelines.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@ pool:
22
vmImage: 'windows-2022'
33

44
variables:
5+
- group: 'code-sign-config'
56
- group: 'dotnet-config'
67
- group: 'github-config'
78

89
steps:
910
- checkout: self
1011
persistCredentials: true
11-
- task: SSMClientToolsSetup@1
12-
displayName: 'Setup DigiCert Tools'
13-
inputs:
14-
APIKey: '$(SM_API_KEY)'
1512
- task: DownloadSecureFile@1
1613
displayName: 'Download Client Authentication Certificate'
1714
name: SM_CLIENT_CERT_FILE
1815
inputs:
1916
secureFile: ClientCert.p12
17+
- task: SSMClientToolsSetup@1
18+
displayName: 'Setup DigiCert Tools'
19+
inputs:
20+
APIKey: '$(SM_API_KEY)'
2021
- task: PowerShell@2
21-
displayName: 'Prepare Code Signing'
22+
displayName: 'Prepare DigiCert Code Signing'
2223
inputs:
2324
targetType: 'inline'
2425
script: |
25-
$env:PATH += ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Program Files\DigiCert\DigiCert Keylocker Tools'
26-
$env:SM_LOG_OUTPUT = 'console'
26+
$env:PATH += ';C:\Program Files\DigiCert\DigiCert Keylocker Tools'
2727
smctl credentials save $(SM_API_KEY) $(SM_CLIENT_CERT_PASSWORD)
2828
smksp_cert_sync.exe
2929
failOnStderr: true
@@ -83,13 +83,12 @@ steps:
8383
modifyOutputPath: false
8484
- task: PowerShell@2
8585
displayName: 'Sign EXE files'
86+
env:
87+
SM_CLIENT_CERT_FILE : $(SM_CLIENT_CERT_FILE.secureFilePath)
8688
inputs:
8789
targetType: 'inline'
8890
script: |
89-
$env:PATH += ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Program Files\DigiCert\DigiCert Keylocker Tools'
90-
$env:SM_HOST = '$(SM_HOST)'
91-
$env:SM_CLIENT_CERT_FILE = '$(SM_CLIENT_CERT_FILE.secureFilePath)'
92-
$env:SM_LOG_OUTPUT = 'console'
91+
$env:PATH += ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64'
9392
signtool.exe sign /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /sha1 $(SM_CERT_FINGERPRINT) $(Build.SourcesDirectory)/src/bin/Publish/win-x64/SqlDocs.exe
9493
signtool.exe sign /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /sha1 $(SM_CERT_FINGERPRINT) $(Build.SourcesDirectory)/src/bin/Publish/win-x86/SqlDocs.exe
9594
signtool.exe sign /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /sha1 $(SM_CERT_FINGERPRINT) $(Build.SourcesDirectory)/src/bin/Publish/portable/SqlDocs.exe
@@ -117,15 +116,14 @@ steps:
117116
replaceExistingArchive: true
118117
- task: PowerShell@2
119118
displayName: 'Sign MSI files'
119+
env:
120+
SM_CLIENT_CERT_FILE : $(SM_CLIENT_CERT_FILE.secureFilePath)
120121
inputs:
121122
targetType: 'inline'
122123
script: |
123-
$env:PATH += ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Program Files\DigiCert\DigiCert Keylocker Tools'
124-
$env:SM_HOST = '$(SM_HOST)'
125-
$env:SM_CLIENT_CERT_FILE = '$(SM_CLIENT_CERT_FILE.secureFilePath)'
126-
$env:SM_LOG_OUTPUT = 'console'
127-
signtool.exe sign /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /sha1 $(SM_CERT_FINGERPRINT) $(Build.ArtifactStagingDirectory)/sqldocs-x64.msi
128-
signtool.exe sign /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /sha1 $(SM_CERT_FINGERPRINT) $(Build.ArtifactStagingDirectory)/sqldocs-x86.msi
124+
$env:PATH += ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64'
125+
signtool.exe sign /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /sha1 $(SM_CERT_FINGERPRINT) /d "SQLDocs" $(Build.ArtifactStagingDirectory)/sqldocs-x64.msi
126+
signtool.exe sign /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /sha1 $(SM_CERT_FINGERPRINT) /d "SQLDocs" $(Build.ArtifactStagingDirectory)/sqldocs-x86.msi
129127
failOnStderr: true
130128
pwsh: true
131129
- task: PowerShell@2

setup/Package.wxs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<!-- Properties for add/remove programs -->
4040
<Property Id="ARPPRODUCTICON" Value="AppIcon.exe" />
4141
<Property Id="ARPHELPLINK" Value="$(var.AppHelpLink)" />
42-
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" />
4342

4443
<!-- Default installation folder -->
4544
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
@@ -72,7 +71,7 @@
7271
Platform="$(var.Platform)"
7372
RollForward="major"
7473
RuntimeType="core"
75-
Version="7.0.0"/>
74+
Version="8.0.0"/>
7675

7776
<!-- Embed cab files into msi -->
7877
<MediaTemplate EmbedCab="yes"/>

src/CommandHandlers.cs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
#endregion
2121

22-
using Enbrea.Progress;
22+
using Enbrea.Konsoli;
2323
using NGettext;
2424
using SqlDocs.DatabaseProvider;
2525
using SqlDocs.DataModel;
@@ -39,40 +39,40 @@ public static async Task BuildJson(DatabaseEngine dbEngine, string dbConnection,
3939
{
4040
await Execute(async (cancellationToken, cancellationEvent) =>
4141
{
42-
var progressReport = ProgressReportFactory.CreateProgressReport(ProgressUnit.Count);
42+
var consoleWriter = ConsoleWriterFactory.CreateConsoleWriter(ProgressUnit.Count);
4343
try
4444
{
45-
progressReport.Start("Generate database schema");
45+
consoleWriter.StartProgress("Generate database schema");
4646

4747
var provider = DatabaseProviderFactory.CreateDatabaseProvider(dbEngine, dbConnection);
4848
var dbSchema = await DbSchemaFactory.CreateDbSchemaAsync(provider, cancellationToken);
4949

50-
progressReport.Finish();
50+
consoleWriter.FinishProgress();
5151

5252
if (dbSchemaFile.Exists)
5353
{
54-
progressReport.Start("Merge and update database schema file");
54+
consoleWriter.StartProgress("Merge and update database schema file");
5555

5656
dbSchema = await DbSchemaFactory.LoadAndMergeDbSchemaAsync(dbSchemaFile, dbSchema, cancellationToken);
5757
await dbSchema.SaveAsync(dbSchemaFile, cancellationToken);
5858

59-
progressReport.Finish();
59+
consoleWriter.FinishProgress();
6060
}
6161
else
6262
{
63-
progressReport.Start("Save database schema file");
63+
consoleWriter.StartProgress("Save database schema file");
6464

6565
await dbSchema.SaveAsync(dbSchemaFile, cancellationToken);
6666

67-
progressReport.Finish();
67+
consoleWriter.FinishProgress();
6868
}
6969

70-
progressReport.Success($"Schema file {dbSchemaFile.Name} successfully generated or updated");
70+
consoleWriter.Success($"Schema file {dbSchemaFile.Name} successfully generated or updated");
7171
}
7272
catch (Exception ex)
7373
{
74-
progressReport.NewLine();
75-
progressReport.Error($"Build failed. {ex.Message}");
74+
consoleWriter.NewLine();
75+
consoleWriter.Error($"Build failed. {ex.Message}");
7676
Environment.ExitCode = 1;
7777
}
7878
});
@@ -82,51 +82,51 @@ public static async Task BuildJsonAndMkDocs(DatabaseEngine dbEngine, string dbCo
8282
{
8383
await Execute(async (cancellationToken, cancellationEvent) =>
8484
{
85-
var progressReport = ProgressReportFactory.CreateProgressReport(ProgressUnit.Count);
85+
var consoleWriter = ConsoleWriterFactory.CreateConsoleWriter(ProgressUnit.Count);
8686
var catalog = new Catalog("SqlDocs", Path.Combine(GetAppFolder(), "./L11n"), new CultureInfo(language));
8787
try
8888
{
89-
progressReport.Start("Generate database schema");
89+
consoleWriter.StartProgress("Generate database schema");
9090

9191
var provider = DatabaseProviderFactory.CreateDatabaseProvider(dbEngine, dbConnection);
9292
var dbSchema = await DbSchemaFactory.CreateDbSchemaAsync(provider, cancellationToken);
9393

94-
progressReport.Finish();
94+
consoleWriter.FinishProgress();
9595

9696
if (dbSchemaFile.Exists)
9797
{
98-
progressReport.Start("Merge and update database schema file");
98+
consoleWriter.StartProgress("Merge and update database schema file");
9999

100100
dbSchema = await DbSchemaFactory.LoadAndMergeDbSchemaAsync(dbSchemaFile, dbSchema, cancellationToken);
101101
await dbSchema.SaveAsync(dbSchemaFile, cancellationToken);
102102

103-
progressReport.Finish();
103+
consoleWriter.FinishProgress();
104104
}
105105
else
106106
{
107-
progressReport.Start("Save database schema file");
107+
consoleWriter.StartProgress("Save database schema file");
108108

109109
await dbSchema.SaveAsync(dbSchemaFile, cancellationToken);
110110

111-
progressReport.Finish();
111+
consoleWriter.FinishProgress();
112112
}
113113

114-
progressReport.Success($"Schema file {dbSchemaFile.Name} successfully generated or updated");
114+
consoleWriter.Success($"Schema file {dbSchemaFile.Name} successfully generated or updated");
115115

116-
progressReport.Start("Generate MkDocs project");
116+
consoleWriter.StartProgress("Generate MkDocs project");
117117

118118
var docsGenerator = DocsGeneratorFactory.CreateMkDocsGenerator(dbEngine, catalog);
119119

120120
await docsGenerator.GenerateAsync(dbSchema, outputFolder);
121121

122-
progressReport.Finish();
123-
progressReport.Success($"MkDocs project successfully generated or updated");
122+
consoleWriter.FinishProgress();
123+
consoleWriter.Success($"MkDocs project successfully generated or updated");
124124

125125
}
126126
catch (Exception ex)
127127
{
128-
progressReport.NewLine();
129-
progressReport.Error($"Build failed. {ex.Message}");
128+
consoleWriter.NewLine();
129+
consoleWriter.Error($"Build failed. {ex.Message}");
130130
Environment.ExitCode = 1;
131131
}
132132
});
@@ -136,33 +136,33 @@ public static async Task BuildMkDocs(DatabaseEngine dbEngine, FileInfo dbSchemaF
136136
{
137137
await Execute(async (cancellationToken, cancellationEvent) =>
138138
{
139-
var progressReport = ProgressReportFactory.CreateProgressReport(ProgressUnit.Count);
139+
var ConsoleWriter = ConsoleWriterFactory.CreateConsoleWriter(ProgressUnit.Count);
140140
var catalog = new Catalog("SqlDocs", Path.Combine(GetAppFolder(), "./L11n"), new CultureInfo(language));
141141
try
142142
{
143-
progressReport.Start("Load database schema file");
143+
ConsoleWriter.StartProgress("Load database schema file");
144144

145145
var dbSchema = await DbSchemaFactory.LoadDbSchemaAsync(dbSchemaFile, cancellationToken);
146146
await dbSchema.SaveAsync(dbSchemaFile, cancellationToken);
147147

148-
progressReport.Finish();
148+
ConsoleWriter.FinishProgress();
149149

150-
progressReport.Success($"Schema file {dbSchemaFile.Name} successfully loaded");
150+
ConsoleWriter.Success($"Schema file {dbSchemaFile.Name} successfully loaded");
151151

152-
progressReport.Start("Generate MkDocs project");
152+
ConsoleWriter.StartProgress("Generate MkDocs project");
153153

154154
var docsGenerator = DocsGeneratorFactory.CreateMkDocsGenerator(dbEngine, catalog);
155155

156156
await docsGenerator.GenerateAsync(dbSchema, outputFolder);
157157

158-
progressReport.Finish();
159-
progressReport.Success($"MkDocs project successfully generated or updated");
158+
ConsoleWriter.FinishProgress();
159+
ConsoleWriter.Success($"MkDocs project successfully generated or updated");
160160

161161
}
162162
catch (Exception ex)
163163
{
164-
progressReport.NewLine();
165-
progressReport.Error($"Build failed. {ex.Message}");
164+
ConsoleWriter.NewLine();
165+
ConsoleWriter.Error($"Build failed. {ex.Message}");
166166
Environment.ExitCode = 1;
167167
}
168168
});

src/Properties/PublishProfiles/Portable.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
99
<PublishDir>bin\Publish\portable</PublishDir>
1010
<PublishProtocol>FileSystem</PublishProtocol>
1111
<_TargetId>Folder</_TargetId>
12-
<TargetFramework>net7.0</TargetFramework>
12+
<TargetFramework>net8.0</TargetFramework>
1313
<SelfContained>false</SelfContained>
1414
</PropertyGroup>
1515
</Project>

src/Properties/PublishProfiles/x64.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
99
<PublishDir>bin\Publish\win-x64</PublishDir>
1010
<PublishProtocol>FileSystem</PublishProtocol>
1111
<_TargetId>Folder</_TargetId>
12-
<TargetFramework>net7.0</TargetFramework>
12+
<TargetFramework>net8.0</TargetFramework>
1313
<SelfContained>false</SelfContained>
1414
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
1515
<PublishSingleFile>true</PublishSingleFile>

src/Properties/PublishProfiles/x86.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
99
<PublishDir>bin\Publish\win-x86</PublishDir>
1010
<PublishProtocol>FileSystem</PublishProtocol>
1111
<_TargetId>Folder</_TargetId>
12-
<TargetFramework>net7.0</TargetFramework>
12+
<TargetFramework>net8.0</TargetFramework>
1313
<SelfContained>false</SelfContained>
1414
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
1515
<PublishSingleFile>true</PublishSingleFile>

src/SqlDocs.App.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<AssemblyName>SqlDocs</AssemblyName>
55
<OutputType>Exe</OutputType>
66
<ApplicationIcon>Program.ico</ApplicationIcon>
7-
<TargetFramework>net7.0</TargetFramework>
7+
<TargetFramework>net8.0</TargetFramework>
88
<Authors>STÜBER SYSTEMS GmbH</Authors>
99
<Company>STÜBER SYSTEMS GmbH</Company>
1010
<Copyright>© 2023 STÜBER SYSTEMS GmbH</Copyright>
@@ -14,11 +14,11 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Enbrea.MdBuilder" Version="0.0.2" />
18-
<PackageReference Include="Enbrea.Progress" Version="0.0.4" />
19-
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="9.1.1" />
17+
<PackageReference Include="Enbrea.Konsoli" Version="0.0.2" />
18+
<PackageReference Include="Enbrea.MdBuilder" Version="0.0.3" />
19+
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="10.0.0" />
2020
<PackageReference Include="NGettext" Version="0.6.7" />
21-
<PackageReference Include="Npgsql" Version="7.0.4" />
21+
<PackageReference Include="Npgsql" Version="8.0.0" />
2222
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
2323
</ItemGroup>
2424

src/Utils/ProgressReportFactory.cs renamed to src/Utils/ConsoleWriterFactory.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@
1919
*/
2020
#endregion
2121

22-
using Enbrea.Progress;
22+
using Enbrea.Konsoli;
2323

2424
namespace SqlDocs;
2525

2626
/// <summary>
27-
/// Static factory class for <see cref="ProgressReport"/> instances
27+
/// Static factory class for <see cref="ConsoleWriter"/> instances
2828
/// </summary>
29-
public static class ProgressReportFactory
29+
public static class ConsoleWriterFactory
3030
{
3131
/// <summary>
32-
/// Creates a new <see cref="ProgressReport"/> instances.
32+
/// Creates a new <see cref="ConsoleWriter"/> instances.
3333
/// </summary>
3434
/// <param name="progressValueUnit">The progress value unit</param>
3535
/// <returns>The new instance</returns>
36-
public static ProgressReport CreateProgressReport(ProgressUnit progressValueUnit)
36+
public static ConsoleWriter CreateConsoleWriter(ProgressUnit progressValueUnit)
3737
{
38-
return new ProgressReport(progressValueUnit)
38+
return new ConsoleWriter(progressValueUnit)
3939
{
40-
Theme = new ProgressReportTheme()
40+
Theme = new ConsoleWriterTheme()
4141
{
4242
ProgressTextFormat = "> {0}",
4343
SuccessLabel = ">"

0 commit comments

Comments
 (0)