openai/openai-python
Publicmirrored fromhttps://github.com/openai/openai-pythonAvailable
bin/check-release-environment
25lines · modecode
| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | errors=() |
| 4 | |
| 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 | |
| 9 | if [ -z "${PYPI_TOKEN}" ]; then |
| 10 | errors+=("The OPENAI_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") |
| 11 | fi |
| 12 | |
| 13 | lenErrors=${#errors[@]} |
| 14 | |
| 15 | if [[ lenErrors -gt 0 ]]; then |
| 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!" |
| 26 | |