Skip to content

Commit

Permalink
chore: Remove all models before copying in latest versions (#1185)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelkins authored Oct 23, 2023
1 parent a0ce157 commit 181256b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions codegen/sdk-codegen/scripts/updatemodels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ fetchGitHubRepo

JSON_MODEL_FILES=`find ${TEMPDIR}/aws-models |grep -e "smithy\/model\.json$"`

# Delete all current model files before copying latest models in.
# This ensures that removed models will not be included in the next release.
rm -rf $OUTPUT_DIR/*

for model in ${JSON_MODEL_FILES}; do
SDKID=`cat ${model} |grep \"sdkId\": | sed 's/.*: \(.*\)/\1/g' | tr -d "\"" | tr -d "," | tr '[:upper:]' '[:lower:]' | tr " " "-"`
NUM_VERSIONS=`cat "${model}" | grep -e "\"version\": \"[0-9]*-[0-9]*-[0-9]*\"" |wc -l |awk '{print $1}'`
Expand Down

0 comments on commit 181256b

Please sign in to comment.