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.

vue-builds.sh 771B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. declare -a apps=("./settings/js/settings-vue.js" "./apps/updatenotification/js/merged.js")
  3. root=$(pwd)
  4. entryFile=$1
  5. if [ ! -f "$entryFile" ]
  6. then
  7. echo "The build file $entryFile does not exists"
  8. exit 2
  9. else
  10. backupFile="$entryFile.orig"
  11. path=$(dirname "$entryFile")
  12. # Backup original file
  13. echo "Backing up $entryFile to $backupFile"
  14. cp $entryFile $backupFile
  15. # Make the app
  16. set -e
  17. cd "$path/../"
  18. make
  19. # Reset
  20. cd $root
  21. # Compare build files
  22. echo "Comparing $entryFile to the original"
  23. if ! diff -q $entryFile $backupFile &>/dev/null
  24. then
  25. echo "$entryFile build is NOT up-to-date! Please send the proper production build within the pull request"
  26. cat $HOME/.npm/_logs/*.log
  27. exit 2
  28. else
  29. echo "$entryFile build is up-to-date"
  30. fi
  31. fi