You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

deploy_cli 554 B

5 vuotta sitten
123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. function check_env_variables_are_setted {
  3. if [ -z "${TWINE_USERNAME}" ] || [ -z "${TWINE_PASSWORD}" ]; then
  4. echo "Need to set TWINE_USERNAME and TWINE_PASSWORD env variables to release cli"
  5. exit 1
  6. fi
  7. }
  8. set +o errexit
  9. check_env_variables_are_setted
  10. set -o errexit
  11. set -o pipefail
  12. set -o nounset
  13. function push_cli_on_pypi {
  14. pushd cli
  15. python -m pip install --upgrade pip
  16. pip install setuptools wheel twine
  17. python setup.py sdist bdist_wheel
  18. twine upload dist/*
  19. popd
  20. }
  21. push_cli_on_pypi