2020-05-01 22:58:22 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Runs in CircleCI
|
|
|
|
# Replaces all the http://localhost links of api-data to match the corresponding deployment location.
|
|
|
|
|
|
|
|
if [ "${CIRCLE_BRANCH}" = 'master' ]; then # https://stackoverflow.com/a/2013589/3482533
|
|
|
|
~/.local/bin/ditto transform --base-url='https://pokeapi.co' --src-dir=data --dest-dir=_gen
|
2020-05-01 23:09:25 +02:00
|
|
|
elif [ "${CIRCLE_BRANCH}" = 'staging' ]; then
|
2020-06-03 20:28:29 +02:00
|
|
|
~/.local/bin/ditto transform --base-url='https://staging.pokeapi.co' --src-dir=data --dest-dir=_gen
|
2020-05-01 22:58:22 +02:00
|
|
|
fi
|