Skip to content

Commit

Permalink
Fix: #312
Browse files Browse the repository at this point in the history
  • Loading branch information
Gildéric DERUETTE committed Sep 29, 2023
1 parent 1a67fa7 commit c2b722b
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 16 deletions.
13 changes: 0 additions & 13 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
{
"omnisharp.enableRoslynAnalyzers": true,
"yaml.schemas": {
"samples/generators/angular/topmodel.config.schema.json": "samples/generators/angular/topmodel.config",
"samples/generators/csharp/topmodel.config.schema.json": "samples/generators/csharp/topmodel.config",
"samples/generators/database/topmodel.config.schema.json": "samples/generators/database/topmodel.config",
"samples/generators/focus/topmodel.config.schema.json": "samples/generators/focus/topmodel.config",
"samples/generators/jpa/topmodel.config.schema.json": "samples/generators/jpa/topmodel.config",
"samples/generators/open-api/topmodel.config.schema.json": "samples/generators/open-api/topmodel.config",
"samples/generators/pg/topmodel.config.schema.json": "samples/generators/pg/topmodel.config",
"samples/generators/php/topmodel.config.schema.json": "samples/generators/php/topmodel.config",
"samples/generators/ssdt/topmodel.config.schema.json": "samples/generators/ssdt/topmodel.config",
"samples/generators/translation/topmodel.config.schema.json": "samples/generators/translation/topmodel.config"
},
"dotnet.defaultSolution": "TopModel.sln",
"java.configuration.updateBuildConfiguration": "automatic",
"java.compile.nullAnalysis.mode": "disabled"
Expand Down
11 changes: 8 additions & 3 deletions TopModel.Utils/TopModelLock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public void Init(ILogger logger)

public void Update(string modelRoot, string lockFileName, ILogger logger, IEnumerable<string> generatedFiles)
{
GeneratedFiles ??= new();

var generatedFilesList = generatedFiles
.Select(f => f.ToRelative(modelRoot))
.Distinct()
Expand All @@ -53,10 +55,13 @@ public void Update(string modelRoot, string lockFileName, ILogger logger, IEnume
};

fw.WriteLine($"version: {Version}");
fw.WriteLine("generatedFiles:");
foreach (var genFile in GeneratedFiles)
if (GeneratedFiles.Count > 0)
{
fw.WriteLine($" - {genFile}");
fw.WriteLine("generatedFiles:");
foreach (var genFile in GeneratedFiles)
{
fw.WriteLine($" - {genFile}");
}
}
}
}
1 change: 1 addition & 0 deletions samples/generators/angular/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: Angular
modelRoot: ../../model
Expand Down
1 change: 1 addition & 0 deletions samples/generators/csharp/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: CSharp
modelRoot: ../../model
Expand Down
1 change: 1 addition & 0 deletions samples/generators/database/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: Database
modelRoot: ./model
Expand Down
1 change: 1 addition & 0 deletions samples/generators/focus/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: Focus
modelRoot: ../../model
Expand Down
1 change: 1 addition & 0 deletions samples/generators/jpa/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: topmodel.jpa.sample.demo
modelRoot: ../../model
Expand Down
1 change: 1 addition & 0 deletions samples/generators/open-api/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: Petstore
lockFileName: petstore.topmodel.lock
1 change: 1 addition & 0 deletions samples/generators/pg/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: pg
modelRoot: ../../model
Expand Down
1 change: 1 addition & 0 deletions samples/generators/php/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: topmodel.php.sample.demo
modelRoot: ../../model
Expand Down
1 change: 1 addition & 0 deletions samples/generators/ssdt/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: ssdt
modelRoot: ../../model
Expand Down
1 change: 1 addition & 0 deletions samples/generators/translation/topmodel.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=./topmodel.config.schema.json
---
app: Translation
modelRoot: ../../model
Expand Down

0 comments on commit c2b722b

Please sign in to comment.