Skip to content

Commit

Permalink
chore: remove patch for redshift in copy-model
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Oct 19, 2021
1 parent f5ba11f commit 37425ce
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions scripts/copy-models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,13 @@ const { models } = yargs
await fsPromises.stat(smithyModelsFile);
// File exists, copy it.
try {
const fileContent = (await fsPromises.readFile(smithyModelsFile))
.toString()
// Fix for issue SMITHY-95
.replace('"smithy.api#authDefinition": {},', "");
const fileContent = (await fsPromises.readFile(smithyModelsFile)).toString();

const sdkIdRE = /"sdkId": "([^"]*)"/;
const sdkId = fileContent.match(sdkIdRE)[1].toLowerCase().replace(/\s/g, "-");

const versionRE = /"version": "([^"]*)"/;
const version = fileContent.match(versionRE)[1];

// Copy file.
const outputFile = join(OUTPUT_DIR, `${sdkId}.${version}.json`);
const outputFile = join(OUTPUT_DIR, `${sdkId}.json`);
await fsPromises.writeFile(outputFile, fileContent);
} catch (e) {
// Copy failed, log.
Expand Down

0 comments on commit 37425ce

Please sign in to comment.