travis-deploy.sh 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/bash
  2. #
  3. # Midnight Commander - deployment script for Travis CI
  4. #
  5. # Copyright (C) 2016
  6. # The Free Software Foundation, Inc.
  7. #
  8. # Written by:
  9. # Yury V. Zaytsev <yury@shurup.com>, 2016
  10. #
  11. # This file is part of the Midnight Commander.
  12. #
  13. # The Midnight Commander is free software: you can redistribute it
  14. # and/or modify it under the terms of the GNU General Public License as
  15. # published by the Free Software Foundation, either version 3 of the License,
  16. # or (at your option) any later version.
  17. #
  18. # The Midnight Commander is distributed in the hope that it will be useful,
  19. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. # GNU General Public License for more details.
  22. #
  23. # You should have received a copy of the GNU General Public License
  24. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  25. set -e
  26. set -x
  27. GLOBAL_VERSION="6.5.7"
  28. GLOBAL_URL="http://ftp.gnu.org/pub/gnu/global/global-${GLOBAL_VERSION}.tar.gz"
  29. HTAGSFIX_URL="https://github.com/mooffie/htagsfix/raw/master/htagsfix"
  30. mkdir .global && pushd .global # ignored by GLOBAL's indexer
  31. wget ${GLOBAL_URL}
  32. tar zxvf global-${GLOBAL_VERSION}.tar.gz > /dev/null 2>&1
  33. pushd global-${GLOBAL_VERSION}
  34. ./configure --prefix=$(pwd)/install > /dev/null 2>&1
  35. make > /dev/null 2>&1
  36. make install > /dev/null 2>&1
  37. popd
  38. export PATH="$(pwd)/global-${GLOBAL_VERSION}/install/bin:$PATH"
  39. popd
  40. gtags -v > /dev/null 2>&1
  41. htags --suggest -t "Welcome to the Midnight Commander source tour!" > /dev/null 2>&1
  42. wget --no-check-certificate ${HTAGSFIX_URL}
  43. ruby htagsfix > /dev/null 2>&1
  44. cd HTML
  45. touch .nojekyll
  46. echo "source.midnight-commander.org" > CNAME
  47. git init
  48. git config user.name "Travis CI"
  49. git config user.email "travis@midnight-commander.org"
  50. git add . > /dev/null 2>&1
  51. git commit -m "Deploy to GitHub Pages" > /dev/null 2>&1
  52. git push --force --quiet git@github.com:MidnightCommander/source.git master:gh-pages > /dev/null 2>&1
  53. exit 0