Skip to content

Instantly share code, notes, and snippets.

@jonathanMelly
Created August 16, 2018 09:08
Show Gist options
  • Save jonathanMelly/f0baad30b137a23451fba3f0f2f172e6 to your computer and use it in GitHub Desktop.
Save jonathanMelly/f0baad30b137a23451fba3f0f2f172e6 to your computer and use it in GitHub Desktop.
Git ftp with sub-sub modules (example : moodle + hvp (incl. hvp submodules) deployment (recursive)
#You need to add a .git-ftp-ignore file with nested modules
#Example:
#moodle/mod/hvp/.git-ftp-ignore:
# editor
# library
# reporting
FTP_USER=john
FTP_PASSWORD=doe
FTP_HOST=tatooine.com
FTP_PATH=var/www
root=$(pwd) git submodule foreach --recursive 'git ftp init -u $FTP_USER -p $FTP_PASSWORD ftp://$FTP_HOST/$FTP_PATH/$(realpath --relative-to=$root $(pwd))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment