update.sh 806 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/bash
  2. cat << "EOF"
  3. Usage:
  4. ./update.sh oss --> Update to the latest OSS version(You will need to manually download the latest release version)
  5. EOF
  6. do_update_dev(){
  7. git pull origin dev
  8. git reset --hard origin/dev
  9. git fetch --prune --prune-tags
  10. rm -r storage/framework/smarty/compile/*
  11. php composer.phar install --no-dev
  12. php composer.phar selfupdate
  13. php xcat Update
  14. php xcat Tool importSetting
  15. php xcat Migration latest
  16. }
  17. do_update_oss(){
  18. rm -r storage/framework/smarty/compile/*
  19. php composer.phar install --no-dev
  20. php composer.phar selfupdate
  21. php xcat Update
  22. php xcat Tool importSetting
  23. php xcat Migration latest
  24. }
  25. if [[ $1 == "dev" ]]; then
  26. do_update_dev
  27. exit 0
  28. fi
  29. if [[ $1 == "oss" ]]; then
  30. do_update_oss
  31. exit 0
  32. fi