Skip to content

Commit

Permalink
fix(release): ensure dependencies are not installed during dryun
Browse files Browse the repository at this point in the history
dryrun option was not supported during release for dependencies

fixes dxatscale#1340
  • Loading branch information
azlam-abdulsalam committed Jul 17, 2023
1 parent c8e05ca commit 5c63448
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EOL } from 'os';

export default class InstallUnlockedPackageCollection {
private installedPackages: Package2Detail[];
constructor(private sfpOrg: SFPOrg, private logger: Logger) {}
constructor(private sfpOrg: SFPOrg, private logger: Logger,private dryRun:boolean=false) {}

public async install(
package2s: Package2Detail[],
Expand Down Expand Up @@ -38,7 +38,8 @@ export default class InstallUnlockedPackageCollection {
);
if (package2.key) installUnlockedPackageImpl.setInstallationKey(package2.key);
try {
await installUnlockedPackageImpl.install();
if(!this.dryRun)
await installUnlockedPackageImpl.install();
} catch (error) {
let message: string = error.message;
if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export default class ReleaseImpl {
externalPackage2s.push(dependendentPackage);
}
let sfpOrg = await SFPOrg.create({ aliasOrUsername: targetOrg });
let packageCollectionInstaller = new InstallUnlockedPackageCollection(sfpOrg, new ConsoleLogger());
let packageCollectionInstaller = new InstallUnlockedPackageCollection(sfpOrg, new ConsoleLogger(),this.props.isDryRun);
await packageCollectionInstaller.install(externalPackage2s, true, true);

groupSection.end();
Expand Down

0 comments on commit 5c63448

Please sign in to comment.