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.
 
 
 
 
 
 

45 lines
1000 B

  1. #!/usr/bin/env bash
  2. function no_uncommitted_changes {
  3. if [ -n "$(git status --porcelain)" ]; then
  4. echo "There is changes not staged here, skipping this repo...";
  5. return 1
  6. else
  7. return 0
  8. fi
  9. }
  10. function commit-with-message {
  11. git add .
  12. git commit -m 'Adding the lastest version of lesspass-pure'
  13. git status
  14. git push --tags origin master
  15. }
  16. function cmd {
  17. echo
  18. echo "------------------------------------------------"
  19. pwd
  20. echo "------------------------------------------------"
  21. if no_uncommitted_changes; then
  22. npm install --save lesspass-pure
  23. npm run build
  24. commit-with-message
  25. fi
  26. }
  27. if [ ! -f readme.md ]; then
  28. echo "You seems to be in the wrong directory"
  29. echo "Execute this script from the root of lesspass with ./scripts/add-lesspass-pure.sh"
  30. exit 1
  31. fi
  32. submodules="cordova cozy desktop frontend webextension"
  33. for submodule in ${submodules}
  34. do
  35. cd $submodule
  36. cmd
  37. cd ..
  38. done
  39. commit-with-message