deploy.sh 618 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. set -e
  3. svn_url=https://svn.apache.org/repos/asf/cordova/site
  4. svn_q() { svn --quiet "$@"; }
  5. svn_with_auth() {
  6. [ $svn_username ] && [ $svn_pass ] || {
  7. echo 'ERROR: No SVN credentials given in $svn_username and $svn_pass'
  8. exit 1
  9. }
  10. svn_q --non-interactive --no-auth-cache \
  11. --username="$svn_username" --password="$svn_pass" "$@"
  12. }
  13. echo "Deploying website and docs to $svn_url"
  14. cd ..
  15. svn_q checkout "$svn_url" cordova-website
  16. cp -R cordova-docs/build-prod/. cordova-website/public/
  17. cd cordova-website
  18. svn_q add --force .
  19. svn_with_auth commit -m "Updated docs"