mirror of
https://github.com/PokeAPI/api-data.git
synced 2024-11-22 07:32:30 +01:00
10 lines
470 B
Bash
10 lines
470 B
Bash
#!/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
|
|
elif [ "${CIRCLE_BRANCH}" = 'staging' ]; then
|
|
~/.local/bin/ditto transform --base-url='https://staging.pokeapi.co' --src-dir=data --dest-dir=_gen
|
|
fi
|