upload-packages.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. VERSION=$1
  3. PASSWORD=$2
  4. if [ -z "$VERSION" ]; then
  5. echo "Please give a version to upload as first parameter"
  6. exit 1
  7. fi
  8. if [ -z "PASSWORD" ]; then
  9. echo "Please give a password as second parameter"
  10. exit 1
  11. fi
  12. NAME="qwbfsmanager"
  13. # $1 - package file path
  14. # $2 - package summary
  15. # $3 - package labels
  16. googleCodeUpload() {
  17. echo "Uploading package '$1'..."
  18. googlecode_upload.pl \
  19. --progress \
  20. --user="pasnox" \
  21. --pass="$PASSWORD" \
  22. --project="qwbfs" \
  23. --summary="$2" \
  24. --label="$3" \
  25. --file="$1"
  26. }
  27. # source tar gz
  28. if [ -f "$NAME-$VERSION-src.tar.gz" ]; then
  29. googleCodeUpload "$NAME-$VERSION-src.tar.gz" "Source Tgz Archive $VERSION" "OpSys-All,Type-Source,Featured"
  30. fi
  31. # source zip
  32. if [ -f "$NAME-$VERSION-src.zip" ]; then
  33. googleCodeUpload "$NAME-$VERSION-src.zip" "Source Zip Archive $VERSION" "OpSys-All,Type-Source,Featured"
  34. fi
  35. # win32 zip
  36. if [ -f "$NAME-$VERSION-win32.zip" ]; then
  37. googleCodeUpload "$NAME-$VERSION-win32.zip" "Windows Zip Archive $VERSION" "OpSys-Windows,Type-Archive,Featured"
  38. fi
  39. # win32 setup
  40. if [ -f "setup-$NAME-$VERSION-win32.exe" ]; then
  41. googleCodeUpload "setup-$NAME-$VERSION-win32.exe" "Windows Installer $VERSION" "OpSys-Windows,Type-Installer,Featured"
  42. fi