openai/openai-java
Publicmirrored fromhttps://github.com/openai/openai-javaAvailable
bin/check-release-environment
37lines · 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 "${SONATYPE_USERNAME}" ]; then |
| 10 | errors+=("The OPENAI_SONATYPE_USERNAME secret has not been set. Please set it in either this repository's secrets or your organization secrets") |
| 11 | fi |
| 12 | |
| 13 | if [ -z "${SONATYPE_PASSWORD}" ]; then |
| 14 | errors+=("The OPENAI_SONATYPE_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets") |
| 15 | fi |
| 16 | |
| 17 | if [ -z "${GPG_SIGNING_KEY}" ]; then |
| 18 | errors+=("The OPENAI_SONATYPE_GPG_SIGNING_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets") |
| 19 | fi |
| 20 | |
| 21 | if [ -z "${GPG_SIGNING_PASSWORD}" ]; then |
| 22 | errors+=("The OPENAI_SONATYPE_GPG_SIGNING_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets") |
| 23 | fi |
| 24 | |
| 25 | lenErrors=${#errors[@]} |
| 26 | |
| 27 | if [[ lenErrors -gt 0 ]]; then |
| 28 | echo -e "Found the following errors in the release environment:\n" |
| 29 | |
| 30 | for error in "${errors[@]}"; do |
| 31 | echo -e "- $error\n" |
| 32 | done |
| 33 | |
| 34 | exit 1 |
| 35 | fi |
| 36 | |
| 37 | echo "The environment is ready to push releases!" |
| 38 | |