openai/openai-python
Publicmirrored from https://github.com/openai/openai-pythonAvailable
bin/check-release-environment
25lines · modeblame
e9c26d1eStainless Bot2 years ago | 1 | #!/usr/bin/env bash |
| 2 | | |
| 3 | errors=() | |
| 4 | | |
217f6d17stainless-app[bot]1 years ago | 5 | if [ -z "${STAINLESS_API_KEY}" ]; then |
| 6 | errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.") | |
| 7 | fi | |
| 8 | | |
e9c26d1eStainless Bot2 years ago | 9 | if [ -z "${PYPI_TOKEN}" ]; then |
18e0b36astainless-app[bot]1 years ago | 10 | errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") |
e9c26d1eStainless Bot2 years ago | 11 | fi |
| 12 | | |
d63eac7fStainless Bot2 years ago | 13 | lenErrors=${#errors[@]} |
e9c26d1eStainless Bot2 years ago | 14 | |
d63eac7fStainless Bot2 years ago | 15 | if [[ lenErrors -gt 0 ]]; then |
e9c26d1eStainless Bot2 years ago | 16 | echo -e "Found the following errors in the release environment:\n" |
| 17 | | |
| 18 | for error in "${errors[@]}"; do | |
| 19 | echo -e "- $error\n" | |
| 20 | done | |
| 21 | | |
| 22 | exit 1 | |
| 23 | fi | |
| 24 | | |
| 25 | echo "The environment is ready to push releases!" |