openai/openai-python
Publicmirrored fromhttps://github.com/openai/openai-pythonAvailable
bin/check-release-environment
21lines · modecode
| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | errors=() |
| 4 | |
| 5 | if [ -z "${PYPI_TOKEN}" ]; then |
| 6 | errors+=("The OPENAI_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") |
| 7 | fi |
| 8 | |
| 9 | lenErrors=${#errors[@]} |
| 10 | |
| 11 | if [[ lenErrors -gt 0 ]]; then |
| 12 | echo -e "Found the following errors in the release environment:\n" |
| 13 | |
| 14 | for error in "${errors[@]}"; do |
| 15 | echo -e "- $error\n" |
| 16 | done |
| 17 | |
| 18 | exit 1 |
| 19 | fi |
| 20 | |
| 21 | echo "The environment is ready to push releases!" |
| 22 | |