phpvms/.travis/deploy_script.sh

21 lines
473 B
Bash
Raw Normal View History

2017-12-14 07:03:59 +08:00
#!/usr/bin/env bash
if test "$TRAVIS_TAG"; then
PKG_NAME=$TRAVIS_TAG
else
PKG_NAME=nightly
fi
echo $PKG_NAME
if [ "$TRAVIS" = "true" ]; then
2017-12-14 07:31:58 +08:00
# delete all superfluous files
rm -rf .git deploy_rsa.enc .idea phpvms.iml .travis .dpl
2017-12-14 07:31:58 +08:00
find . -type d -name ".git" | xargs rm -rf
2017-12-14 07:31:58 +08:00
# tar and upload
2017-12-14 07:26:16 +08:00
tar -czf $PKG_NAME.tar.gz -C $TRAVIS_BUILD_DIR phpvms
rsync -r --delete-after --quiet $PKG_NAME.tar.gz downloads@phpvms.net:/var/www/downloads/
fi