Skip to content

Commit

Permalink
Merge branch 'feature/verbose-output' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffen committed Aug 24, 2023
2 parents e821bdb + fdd5266 commit d95bd39
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Added verbose output to import dacpac and install dacpac.

## [1.5.0] - 2023-05-31

### Changed
Expand Down
6 changes: 5 additions & 1 deletion src/PsDac/ImportPackageCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ protected override void AsyncProcessRecord()
switch (ParameterSetName)
{
case PARAMETERSET_DATABASE:
using (MemoryStream packageStream = new()) {
using (MemoryStream packageStream = new())
{

WriteVerbose($"Import dacpac from database [{DatabaseName}].");
Service.Extract(
packageStream: packageStream,
databaseName: DatabaseName,
Expand All @@ -91,6 +94,7 @@ protected override void AsyncProcessRecord()
throw new ArgumentException($"Path does not exist.", Path.FullName);
}

WriteVerbose($"Import dacpac from file '{Path.FullName}'.");
package = DacPackage.Load(
fileName: Path.FullName,
modelStorageType: DacSchemaModelStorageType.Memory,
Expand Down
1 change: 1 addition & 0 deletions src/PsDac/InstallPackageCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ protected override void BeginProcessing()

protected override void AsyncProcessRecord()
{
WriteVerbose($"Install dacpac '{Package.Name}' v{Package.Version} to [{DatabaseName}]");
Service.Deploy(package: Package, targetDatabaseName: DatabaseName, upgradeExisting: UpgradeExisting.IsPresent, options: DeployOptions);
}
}
Expand Down

0 comments on commit d95bd39

Please sign in to comment.