Skip to content

Commit

Permalink
modgen 2.1.1 / vscode 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JabX committed Sep 27, 2024
1 parent 460b5a1 commit 2c0706e
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 30 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ Changelogs des modules :
- [`sql`](./TopModel.Generator.Sql/CHANGELOG.md)
- [`translation`](./TopModel.Generator.Translation/CHANGELOG.md)

## 2.1.1

- [`a27223ef`](https://github.com/klee-contrib/topmodel/commit/a27223ef2969e3df59a455d1c37a86b43c0d834d) - [modgen] maxdepth = 3 lors de la recherche d'un fichier de config

Au lieu de chercher à profondeur "infinie" les fichiers de config topmodel dans le répertoire courant, on s'arrête aux 3 premiers niveaux (pour éviter que ça soit très long...)

- [`67f27db3`](https://github.com/klee-contrib/topmodel/commit/67f27db3f5fe92b8bc3e8a49634134bbcf70f5ca) - [modgen] Build des générateurs custom si sources modifiées (avec hash dans le lockfile)
- [`460b5a19`](https://github.com/klee-contrib/topmodel/commit/460b5a198789299e0e2ad7da3a33ad4307de7f24) - [modgen] Sauvegarde des derniers fichiers builds en custom dans .modgen

`modgen` va build vos générateurs customs au lancement, si les sources de la dernière version utilisée (hash sauvegardé dans le lockfile) ou buildée (hash sauvegardé dans `.modgen`) ont changé.

## 2.1.0

- [`#390`](https://github.com/klee-contrib/topmodel/pull/390) - `customProperties` sur classes, endpoints et propriétés
Expand Down
2 changes: 1 addition & 1 deletion TopModel.Core/TopModel.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<PropertyGroup>
<PackageOutputPath>../.nupkg</PackageOutputPath>
<Version>2.1.0</Version>
<Version>2.1.1</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Authors>JabX;gideruette</Authors>
<Description>Librairie de modélisation TopModel.</Description>
Expand Down
2 changes: 1 addition & 1 deletion TopModel.Generator.Core/TopModel.Generator.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<PropertyGroup>
<PackageOutputPath>../.nupkg</PackageOutputPath>
<Version>2.1.0</Version>
<Version>2.1.1</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Authors>JabX;gideruette</Authors>
<Description>Librarie de base pour écrire un générateur TopModel.</Description>
Expand Down
23 changes: 9 additions & 14 deletions TopModel.Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,19 +277,14 @@ void SearchConfigFile(string dirName, int depth = 0)

var customDir = Path.GetFullPath(Path.Combine(new FileInfo(Path.GetFullPath(fullName)).DirectoryName!, cg));

string GetCgHash()
{
return GetHash(
Directory
.EnumerateFiles(
Path.GetFullPath(cg, new FileInfo(fullName).DirectoryName!),
"*.cs",
SearchOption.AllDirectories)
.Where(f => !f.Contains($"{Path.DirectorySeparatorChar}obj{Path.DirectorySeparatorChar}")),
customDir) ?? string.Empty;
}

var customHash = GetCgHash();
var customHash = GetHash(
Directory
.EnumerateFiles(
Path.GetFullPath(cg, new FileInfo(fullName).DirectoryName!),
"*.cs",
SearchOption.AllDirectories)
.Where(f => !f.Contains($"{Path.DirectorySeparatorChar}obj{Path.DirectorySeparatorChar}")),
customDir) ?? string.Empty;

var customHashLocalFile = Path.Combine(modgenRoot, cg.Replace("/", "-").Replace("\\", "-"));
var customHashLocal = File.Exists(customHashLocalFile) ? await File.ReadAllTextAsync(customHashLocalFile) : string.Empty;
Expand Down Expand Up @@ -318,7 +313,7 @@ string GetCgHash()

logger.LogInformation($"Build de '{cg}' terminé.");
topModelLock.Custom ??= [];
topModelLock.Custom[cg] = GetCgHash();
topModelLock.Custom[cg] = customHash;
await File.WriteAllTextAsync(customHashLocalFile, topModelLock.Custom[cg]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion TopModel.Generator/TopModel.Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackAsTool>true</PackAsTool>
<PackageOutputPath>../.nupkg</PackageOutputPath>
<ToolCommandName>modgen</ToolCommandName>
<Version>2.1.0</Version>
<Version>2.1.1</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Authors>JabX;gideruette</Authors>
<Description>Générateur de modèle TopModel.</Description>
Expand Down
2 changes: 1 addition & 1 deletion TopModel.Utils/TopModel.Utils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<PropertyGroup>
<PackageOutputPath>../.nupkg</PackageOutputPath>
<Version>2.1.0</Version>
<Version>2.1.1</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Authors>JabX;gideruette</Authors>
<Description>Utilitaires TopModel.</Description>
Expand Down
4 changes: 2 additions & 2 deletions TopModel.VSCode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion TopModel.VSCode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"directory": "TopModel.VSCode",
"type": "git"
},
"version": "2.1.1",
"version": "2.1.2",
"engines": {
"vscode": "^1.84.1"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![logo](./media/IconDark.svg)

# TopModel <small>2.0.4</small>
# TopModel <small>2.1.1</small>

> Modélisez en toute simplicité.
Expand Down
2 changes: 1 addition & 1 deletion samples/model/angular.topmodel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT !
#

version: 2.1.0
version: 2.1.1
custom:
../../../TopModel.Generator.Javascript: e39801d826bcb9c740ebb356ac0b7fbb
generatedFiles:
Expand Down
2 changes: 1 addition & 1 deletion samples/model/csharp.topmodel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT !
#

version: 2.1.0
version: 2.1.1
custom:
../../../TopModel.Generator.Csharp: 121e8b5ce6a8be344945262bf8960580
generatedFiles:
Expand Down
2 changes: 1 addition & 1 deletion samples/model/focus.topmodel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT !
#

version: 2.1.0
version: 2.1.1
custom:
../../../TopModel.Generator.Javascript: e39801d826bcb9c740ebb356ac0b7fbb
generatedFiles:
Expand Down
2 changes: 1 addition & 1 deletion samples/model/jpa.topmodel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT !
#

version: 2.1.0
version: 2.1.1
custom:
../../../TopModel.Generator.Jpa: 3df4f5992b92ce79d5bfddf465926bd2
generatedFiles:
Expand Down
2 changes: 1 addition & 1 deletion samples/model/pg.topmodel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT !
#

version: 2.1.0
version: 2.1.1
custom:
../../../TopModel.Generator.Sql: a7d6d70714c8ee38aeac8e9447ed12fd
generatedFiles:
Expand Down
2 changes: 1 addition & 1 deletion samples/model/php.topmodel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT !
#

version: 2.1.0
version: 2.1.1
custom:
../../../TopModel.Generator.Php: 8029e36a5806c385b25b725c2e00ecdc
generatedFiles:
Expand Down
2 changes: 1 addition & 1 deletion samples/model/ssdt.topmodel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT !
#

version: 2.1.0
version: 2.1.1
custom:
../../../TopModel.Generator.Sql: a7d6d70714c8ee38aeac8e9447ed12fd
generatedFiles:
Expand Down
2 changes: 1 addition & 1 deletion samples/model/translation.topmodel.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ATTENTION CE FICHIER EST GENERE AUTOMATIQUEMENT !
#

version: 2.1.0
version: 2.1.1
custom:
../../../TopModel.Generator.Translation: 9f15a161c1cd09a554e17eb18f624495
generatedFiles:
Expand Down

0 comments on commit 2c0706e

Please sign in to comment.