release.sh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash -e
  2. #release.sh 1.8.2
  3. #creates an airtime folder with a "1.8.2" suffix
  4. #creates tarballs with a "1.8.2" suffix
  5. #release.sh 1.8.2 RC
  6. #creates an airtime folder with a "1.8.2" suffix
  7. #creates tarballs with a "1.8.2-RC" suffix
  8. if [ $# == 0 ]; then
  9. echo "Zero arguments"
  10. exit
  11. elif [ $# == 1 ]; then
  12. suffix=$1
  13. version=$1
  14. else
  15. suffix=$1-$2
  16. version=$1
  17. fi
  18. dir=$(dirname $(readlink -f $0))
  19. gitrepo=$(readlink -f ./../../)
  20. echo "Creating tarballs with ${suffix} suffix"
  21. target=/tmp/airtime-${version}
  22. target_file=/tmp/airtime-${suffix}.tar.gz
  23. rm -rf $target
  24. rm -f $target_file
  25. git clone file://$gitrepo $target
  26. cd $target
  27. echo "Checking out tag airtime-${suffix}"
  28. git checkout airtime-${suffix}
  29. cd $target
  30. rm -rf .git .gitignore .gitmodules .zfproject.xml dev_tools/ audio_samples/
  31. #echo "Minimizing Airtime Javascript files..."
  32. #cd $dir
  33. #find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec bash -c 'echo {}; jsmin/jsmin < {} > {}.min' \;
  34. #find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \;
  35. #echo "Done"
  36. #zip -r airtime-${suffix}.zip airtime-${version}
  37. cd /tmp/
  38. tar -czf $target_file airtime-${version}
  39. echo "Output file available at $target_file"