main
 1#!/usr/bin/env bash
 2
 3errors=()
 4
 5if [ -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.")
 7fi
 8
 9if [ -z "${PYPI_TOKEN}" ]; then
10  errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
11fi
12
13lenErrors=${#errors[@]}
14
15if [[ 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
23fi
24
25echo "The environment is ready to push releases!"