Skip to content

Commit

Permalink
remove fingerprint() method
Browse files Browse the repository at this point in the history
  • Loading branch information
jogold committed Jun 9, 2020
1 parent 3b77e7f commit 1ff601d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/@aws-cdk/core/lib/asset-staging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ export class AssetStaging extends Construct {
}
}

private fingerprint(fileOrDirectory: string) {
return FileSystem.fingerprint(fileOrDirectory, this.fingerprintOptions);
}

private bundle(options: BundlingOptions): string {
// Create temporary directory for bundling
const bundleDir = fs.mkdtempSync(path.resolve(path.join(os.tmpdir(), 'cdk-asset-bundle-')));
Expand Down Expand Up @@ -181,14 +177,14 @@ export class AssetStaging extends Construct {

private calculateHash(hashType: AssetHashType, assetHash?: string): string {
if (hashType === AssetHashType.SOURCE) {
return this.fingerprint(this.sourcePath);
return FileSystem.fingerprint(this.sourcePath, this.fingerprintOptions);
}

if (hashType === AssetHashType.BUNDLE) {
if (!this.bundleDir) {
throw new Error('Cannot use `AssetHashType.BUNDLE` when `bundling` is not specified.');
}
return this.fingerprint(this.bundleDir);
return FileSystem.fingerprint(this.bundleDir, this.fingerprintOptions);
}

if (hashType === AssetHashType.CUSTOM) {
Expand Down

0 comments on commit 1ff601d

Please sign in to comment.