No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

54 líneas
1.3 KiB

  1. #!/usr/bin/env bash
  2. set +o errexit
  3. function check_branch_is_master {
  4. BRANCH_NAME=$(git branch | grep \* | cut -d ' ' -f2)
  5. if [ $BRANCH_NAME != "master" ]
  6. then
  7. echo >&2 "Current branch is not master. Aborting."
  8. exit 1
  9. fi
  10. }
  11. function check_tag_is_present {
  12. git describe --exact-match --tags
  13. if [ $? != 0 ]
  14. then
  15. echo >&2 "Current revision is not tagged. Aborting."
  16. exit 1
  17. fi
  18. }
  19. function check_repository_is_clean {
  20. git diff-index --quiet HEAD
  21. if [ $? == 1 ]
  22. then
  23. echo >&2 "Git repository not clean. Aborting."
  24. exit 1
  25. fi
  26. }
  27. function check_lesspass_pure_built_files_are_updated {
  28. yarn workspace lesspass-pure run build
  29. check_repository_is_clean
  30. }
  31. function check_lesspass_web_extension_built_files_are_updated {
  32. yarn workspace lesspass-web-extension run build
  33. check_repository_is_clean
  34. }
  35. check_branch_is_master
  36. check_tag_is_present
  37. check_lesspass_web_extension_built_files_are_updated
  38. check_lesspass_pure_built_files_are_updated
  39. set -o errexit
  40. set -o pipefail
  41. set -o nounset
  42. yarn workspace lesspass-web-extension run release
  43. VERSION=$(grep -Po '(?<="version": ")[^"]*' package.json)
  44. echo "See the new release on https://github.com/lesspass/lesspass/releases/tag/${VERSION}"