commit
f44a8f820b
@ -47,6 +47,7 @@ pipeline:
|
|||||||
secure: true (default) | false # true = use FTP(S), false = FTP without SSL
|
secure: true (default) | false # true = use FTP(S), false = FTP without SSL
|
||||||
verify: true (default) | false # true = strong SSL verification, false = supress SSL verification error
|
verify: true (default) | false # true = strong SSL verification, false = supress SSL verification error
|
||||||
chmod: true (default) | false # true = chmod after file transferred, false = no chmod after file transferred
|
chmod: true (default) | false # true = chmod after file transferred, false = no chmod after file transferred
|
||||||
|
clean_dir: true | false (default) # true = clean destination directory before transferring files, false = don't clean
|
||||||
dest_dir: /var/www/mysite
|
dest_dir: /var/www/mysite
|
||||||
src_dir: /mysite/static
|
src_dir: /mysite/static
|
||||||
exclude:
|
exclude:
|
||||||
|
17
upload.sh
17
upload.sh
@ -26,14 +26,16 @@ if [ -z "$PLUGIN_SRC_DIR" ]; then
|
|||||||
PLUGIN_SRC_DIR="/"
|
PLUGIN_SRC_DIR="/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$PLUGIN_CHMOD" ]; then
|
if [ "$PLUGIN_CHMOD" = false ]; then
|
||||||
PLUGIN_CHMOD=""
|
|
||||||
else
|
|
||||||
if [ "$PLUGIN_CHMOD" = true ]; then
|
|
||||||
PLUGIN_CHMOD=""
|
|
||||||
else
|
|
||||||
PLUGIN_CHMOD="-p"
|
PLUGIN_CHMOD="-p"
|
||||||
fi
|
else
|
||||||
|
PLUGIN_CHMOD=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$PLUGIN_CLEAN_DIR" = true ]; then
|
||||||
|
PLUGIN_CLEAN_DIR="rm -r $PLUGIN_DEST_DIR"
|
||||||
|
else
|
||||||
|
PLUGIN_CLEAN_DIR=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PLUGIN_EXCLUDE_STR=""
|
PLUGIN_EXCLUDE_STR=""
|
||||||
@ -54,5 +56,6 @@ lftp -e "set xfer:log 1; \
|
|||||||
set ftp:ssl-protect-data $PLUGIN_SECURE; \
|
set ftp:ssl-protect-data $PLUGIN_SECURE; \
|
||||||
set ssl:verify-certificate $PLUGIN_VERIFY; \
|
set ssl:verify-certificate $PLUGIN_VERIFY; \
|
||||||
set ssl:check-hostname $PLUGIN_VERIFY; \
|
set ssl:check-hostname $PLUGIN_VERIFY; \
|
||||||
|
$PLUGIN_CLEAN_DIR; \
|
||||||
mirror --verbose $PLUGIN_CHMOD -R $PLUGIN_INCLUDE_STR $PLUGIN_EXCLUDE_STR $(pwd)$PLUGIN_SRC_DIR $PLUGIN_DEST_DIR" \
|
mirror --verbose $PLUGIN_CHMOD -R $PLUGIN_INCLUDE_STR $PLUGIN_EXCLUDE_STR $(pwd)$PLUGIN_SRC_DIR $PLUGIN_DEST_DIR" \
|
||||||
-u $FTP_USERNAME,$FTP_PASSWORD $PLUGIN_HOSTNAME
|
-u $FTP_USERNAME,$FTP_PASSWORD $PLUGIN_HOSTNAME
|
||||||
|
Loading…
Reference in New Issue
Block a user