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.
 
 
 
 
 
 

29 regels
882 B

  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. cd packages/lesspass-web-extension
  15. yarn install
  16. yarn run release
  17. commit=$( git rev-parse HEAD )
  18. wget http://github.com/lesspass/lesspass/archive/${commit}.zip
  19. echo "Sources saved in ${commit}.zip"
  20. echo "Upload them on https://addons.mozilla.org/en-US/developers/"
  21. }
  22. release_web_extensions