Skip to content

Instantly share code, notes, and snippets.

@andreyk0
Created May 1, 2020 13:36
Show Gist options
  • Save andreyk0/5990cea26c35249b354580dd37dc34a5 to your computer and use it in GitHub Desktop.
Save andreyk0/5990cea26c35249b354580dd37dc34a5 to your computer and use it in GitHub Desktop.
amazonka 1 module at a time
#!/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