選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

deploy_web_extensions 875 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. function check_env_variables_are_setted {
  3. if [ -z "${EXTENSION_ID}" ] || [ -z "${CLIENT_ID}" ] || [ -z "${CLIENT_SECRET}" ] || [ -z "${REFRESH_TOKEN}" ] || [ -z "${WEB_EXT_API_KEY}" ] || [ -z "${WEB_EXT_API_SECRET}" ]; then
  4. echo "Need to set EXTENSION_ID, CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN, WEB_EXT_API_KEY and WEB_EXT_API_SECRET env variables to release web extensions"
  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 release_web_extensions {
  14. yarn install
  15. yarn workspace lesspass-web-extension run release
  16. commit=$( git rev-parse HEAD )
  17. wget http://github.com/lesspass/lesspass/archive/${commit}.zip
  18. echo "Sources saved in ${commit}.zip"
  19. echo "Upload them on https://addons.mozilla.org/en-US/developers/"
  20. }
  21. release_web_extensions