Merge pull request #133 from kiwix/fix_deploy

Deploy dist archive in project subdirectory (as for compiled binaries).
This commit is contained in:
Matthieu Gautier 2018-03-21 13:59:47 +01:00 committed by GitHub
commit 770630c6bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 6 deletions

View File

@ -47,17 +47,25 @@ then
DIST_KIWIX_ARCHIVES=$(find $DIST_KIWIX_ARCHIVES_DIR -type f) DIST_KIWIX_ARCHIVES=$(find $DIST_KIWIX_ARCHIVES_DIR -type f)
if [[ "x$DIST_KIWIX_ARCHIVES" != "x" ]] if [[ "x$DIST_KIWIX_ARCHIVES" != "x" ]]
then then
for archive in $DIST_KIWIX_ARCHIVES
do
subdir=$(basename $(dirname $archive))
scp -vrp -i ${SSH_KEY} \ scp -vrp -i ${SSH_KEY} \
${DIST_KIWIX_ARCHIVES} \ ${archive} \
nightlybot@download.kiwix.org:/var/www/download.kiwix.org/release nightlybot@download.kiwix.org:/var/www/download.kiwix.org/release/${subdir}
done
fi fi
DIST_ZIM_ARCHIVES=$(find $DIST_ZIM_ARCHIVES_DIR -type f) DIST_ZIM_ARCHIVES=$(find $DIST_ZIM_ARCHIVES_DIR -type f)
if [[ "x$DIST_ZIM_ARCHIVES" != "x" ]] if [[ "x$DIST_ZIM_ARCHIVES" != "x" ]]
then then
for archive in $DIST_ZIM_ARCHIVES
do
subdir=$(basename $(dirname $archive))
scp -vrp -i ${SSH_KEY} \ scp -vrp -i ${SSH_KEY} \
${DIST_ZIM_ARCHIVES} \ ${archive} \
nightlybot@download.openzim.org:/var/www/download.openzim.org/release nightlybot@download.openzim.org:/var/www/download.openzim.org/release/${subdir}
done
fi fi
fi fi