123456789101112131415161718192021222324252627282930313233343536 |
- #!/bin/bash
- # Deploy to www.jovian-hersemeule.eu
- echo 'Deploy website to OVH'
- gitRoot=`git rev-parse --show-toplevel`
- origin="$gitRoot/web"
- host='ftp.cluster021.hosting.ovh.net'
- user='jovianhedk'
- port='21'
- dest='www'
- cd $origin
- files=`echo *.php include/*.php projets/*.php include/css/*.css include/css/custom/*.css include/js/*.js include/images/*.png include/images/*.jpg include/generated/*.txt`
- echo 'Files to be sent :'
- echo "$files"
- echo "FTP to $host"
- read -s -p "[deploy] password for $user: " password
- echo
- # Dump varying files
- bash "$gitRoot/undeployed/scripts/deploy/up-date.sh"
- bash "$gitRoot/undeployed/scripts/deploy/up-version.sh"
- # ftp operation
- ftp -vin $host $port<<EOT
- user $user $password
- nmap \$1 $dest/\$1
- mput $files
- bye
- EOT
- # Cancel dump mofifications
- git checkout -- "$gitRoot/web/include/generated/date.txt"
- git checkout -- "$gitRoot/web/include/generated/version.txt"
|