Skip to content

Commit

Permalink
add support for dacpac merge to CLI
Browse files Browse the repository at this point in the history
fixes #1985
  • Loading branch information
ErikEJ committed Oct 27, 2023
1 parent 2c4cd57 commit a23f1a6
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
3 changes: 2 additions & 1 deletion samples/efcpt-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"discover-multiple-stored-procedure-resultsets-preview": false,
"use-alternate-stored-procedure-resultset-discovery": false,
"t4-template-path": null,
"use-no-navigations-preview": false
"use-no-navigations-preview": false,
"merge-dacpacs": false
},
"names":
{
Expand Down
11 changes: 10 additions & 1 deletion samples/efcpt-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,14 @@
"examples": [
false
]
},
"merge-dacpacs": {
"type": "boolean",
"default": false,
"title": "Merge .dacpac files (when using .dacpac references)",
"examples": [
false
]
}
},
"examples": [{
Expand All @@ -380,7 +388,8 @@
"soft-delete-obsolete-files": false,
"discover-multiple-stored-procedure-resultsets-preview": false,
"use-alternate-stored-procedure-resultset-discovery": false,
"use-no-navigations-preview": false
"use-no-navigations-preview": false,
"merge-dacpacs": false
}]
},
"names": {
Expand Down
9 changes: 5 additions & 4 deletions src/GUI/RevEng.Shared/Cli/CliConfigMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Runtime.Serialization.Json;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using RevEng.Common.Cli.Configuration;

namespace RevEng.Common.Cli
Expand Down Expand Up @@ -80,13 +79,15 @@ public static ReverseEngineerCommandOptions ToOptions(this CliConfig config, str
UseDateOnlyTimeOnly = typeMappings.UseDateOnlyTimeOnly,
UseNullableReferences = config.CodeGeneration.UseNullableReferenceTypes,
ProjectRootNamespace = names.RootNamespace,
MergeDacpacs = config.CodeGeneration.MergeDacpacs,

// Not supported/implemented:
UseNoDefaultConstructor = false,
// Not supported:
UseHandleBars = false,
SelectedHandlebarsLanguage = 0, // handlebars support, will not support it
OptionsPath = null, // handlebars support, will not support it
MergeDacpacs = false, // not implemented, will consider if asked for

// Not implemented:
UseNoDefaultConstructor = false, // not implemented, will consider if asked for
DefaultDacpacSchema = null, // not implemented, will consider if asked for
UseNoObjectFilter = false, // will always add all objects and use exclusions to filter list (for now)
UseAsyncCalls = true, // not implemented, will consider if asked for
Expand Down
3 changes: 3 additions & 0 deletions src/GUI/RevEng.Shared/Cli/Configuration/CodeGeneration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@ public class CodeGeneration
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("use-no-navigations-preview")]
public bool UseNoNavigationsPreview { get; set; }

[JsonPropertyName("merge-dacpacs")]
public bool MergeDacpacs { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/GUI/efcpt.6/efcpt.6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Description>Entity Framework Core Power Tools command line tool </Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageVersion>6.0.0-rc.13</PackageVersion>
<InformationalVersion>6.0.0-rc.13</InformationalVersion>
<PackageVersion>6.0.0-rc.14</PackageVersion>
<InformationalVersion>6.0.0-rc.14</InformationalVersion>
<Version>6.0.0</Version>
<RepositoryUrl>https://github.com/ErikEJ/EFCorePowerTools</RepositoryUrl>
<PackageProjectUrl>https://github.com/ErikEJ/EFCorePowerTools</PackageProjectUrl>
Expand Down
4 changes: 2 additions & 2 deletions src/GUI/efcpt.7/efcpt.7.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Description>Entity Framework Core Power Tools command line tool</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageVersion>7.0.0-rc.13</PackageVersion>
<InformationalVersion>7.0.0-rc.13</InformationalVersion>
<PackageVersion>7.0.0-rc.14</PackageVersion>
<InformationalVersion>7.0.0-rc.14</InformationalVersion>
<Version>7.0.0</Version>
<RepositoryUrl>https://github.com/ErikEJ/EFCorePowerTools</RepositoryUrl>
<PackageProjectUrl>https://github.com/ErikEJ/EFCorePowerTools</PackageProjectUrl>
Expand Down
4 changes: 2 additions & 2 deletions src/GUI/efcpt.8/efcpt.8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Description>Entity Framework Core Power Tools command line tool </Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageVersion>8.0.0-rc.13</PackageVersion>
<InformationalVersion>8.0.0-rc.13</InformationalVersion>
<PackageVersion>8.0.0-rc.14</PackageVersion>
<InformationalVersion>8.0.0-rc.14</InformationalVersion>
<Version>8.0.0</Version>
<RepositoryUrl>https://github.com/ErikEJ/EFCorePowerTools</RepositoryUrl>
<PackageProjectUrl>https://github.com/ErikEJ/EFCorePowerTools</PackageProjectUrl>
Expand Down

0 comments on commit a23f1a6

Please sign in to comment.