Mirror of retrofit, Type-safe HTTP client for Android and Java by Square, Inc.
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.

deploy_website.sh 686B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. set -ex
  3. REPO="git@github.com:square/retrofit.git"
  4. DIR=temp-clone
  5. # Delete any existing temporary website clone
  6. rm -rf $DIR
  7. # Clone the current repo into temp folder
  8. git clone $REPO $DIR
  9. # Move working directory into temp folder
  10. cd $DIR
  11. # Checkout and track the gh-pages branch
  12. git checkout -t origin/gh-pages
  13. # Delete everything that isn't versioned (1.x, 2.x)
  14. ls | grep -E -v '^\d+\.x$' | xargs rm -rf
  15. # Copy website files from real repo
  16. cp -R ../website/* .
  17. # Stage all files in git and create a commit
  18. git add .
  19. git add -u
  20. git commit -m "Website at $(date)"
  21. # Push the new files up to GitHub
  22. git push origin gh-pages
  23. # Delete our temp folder
  24. cd ..
  25. rm -rf $DIR