Created
May 1, 2020 13:36
-
-
Save andreyk0/5990cea26c35249b354580dd37dc34a5 to your computer and use it in GitHub Desktop.
amazonka 1 module at a time
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
#!/bin/sh | |
# Run in 'gen' | |
# gen/vendor/botocore: 1.16.0 | |
set -e | |
set -x | |
PROOT=$(realpath ..) | |
GROOT=$(realpath .) | |
reset_project() { | |
cd $PROOT | |
git reset HEAD ; | |
git clean -fd . ; | |
git checkout . ; | |
} | |
accept_model() { | |
cd $GROOT | |
git add model | |
git commit --no-gpg-sign -m "this one works" | |
} | |
one_model() { | |
d=$1 | |
cd $GROOT | |
rsync -av vendor/botocore/botocore/data/$d/ model/$d/ ; | |
MODELS=model/$d make gen ; | |
cd $PROOT | |
(stack build --fast && accept_model) || echo $d >> ~/a/SKIPPED | |
} | |
try_new_models() { | |
for d in $(ls -1 model) ; do | |
reset_project ; | |
one_model $d ; | |
done | |
} | |
try_new_models |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment