-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to automatically remove old not used models (#1981)
Adds step during the SDK's generate process that will strip out old unused model versions. This prevents the SDK from continually to persist old models.
- Loading branch information
Showing
108 changed files
with
14 additions
and
159,007 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#/usr/bin/env bash | ||
|
||
# Deletes all but the most current model version. | ||
for v in $(ls ./models/apis | grep -v '.go' ); do | ||
for vm in $(ls -r models/apis/$v/ | sed -n '1!p' ); do | ||
echo "rm -r models/apis/$v/$vm" | ||
rm -r models/apis/$v/$vm | ||
done | ||
done |
Oops, something went wrong.